|
13 | 13 | if: github.repository == 'aws/aws-sam-cli' |
14 | 14 | runs-on: ubuntu-latest |
15 | 15 | steps: |
| 16 | + - name: Check if PR already exists |
| 17 | + env: |
| 18 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + run: | |
| 20 | + PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_app_templates_hash --json id --jq length) |
| 21 | + if [ "$PR_COUNT" -ge 1 ]; then |
| 22 | + echo "PR already exists for update_app_templates_hash, skipping workflow" |
| 23 | + exit 1 |
| 24 | + fi |
| 25 | +
|
16 | 26 | - name: Checkout App Templates |
17 | 27 | uses: actions/checkout@v6 |
18 | 28 | with: |
|
58 | 68 | if: github.repository == 'aws/aws-sam-cli' |
59 | 69 | runs-on: ubuntu-latest |
60 | 70 | steps: |
| 71 | + - name: Check if PR already exists |
| 72 | + env: |
| 73 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + run: | |
| 75 | + PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_sam_transform_version --json id --jq length) |
| 76 | + if [ "$PR_COUNT" -ge 1 ]; then |
| 77 | + echo "PR already exists for update_sam_transform_version, skipping workflow" |
| 78 | + exit 1 |
| 79 | + fi |
| 80 | +
|
61 | 81 | - name: Checkout SAM |
62 | 82 | uses: actions/checkout@v6 |
63 | 83 | with: |
@@ -117,6 +137,16 @@ jobs: |
117 | 137 | if: github.repository == 'aws/aws-sam-cli' |
118 | 138 | runs-on: ubuntu-latest |
119 | 139 | steps: |
| 140 | + - name: Check if PR already exists |
| 141 | + env: |
| 142 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 143 | + run: | |
| 144 | + PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_lambda_builders_version --json id --jq length) |
| 145 | + if [ "$PR_COUNT" -ge 1 ]; then |
| 146 | + echo "PR already exists for update_lambda_builders_version, skipping workflow" |
| 147 | + exit 1 |
| 148 | + fi |
| 149 | +
|
120 | 150 | - name: Checkout Lambda Builders |
121 | 151 | uses: actions/checkout@v6 |
122 | 152 | with: |
|
0 commit comments