Skip to content

Commit b2ee6c9

Browse files
authored
Update automated-updates-to-sam-cli.yml (#8621)
1 parent 4aee2ed commit b2ee6c9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/automated-updates-to-sam-cli.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ jobs:
1313
if: github.repository == 'aws/aws-sam-cli'
1414
runs-on: ubuntu-latest
1515
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+
1626
- name: Checkout App Templates
1727
uses: actions/checkout@v6
1828
with:
@@ -58,6 +68,16 @@ jobs:
5868
if: github.repository == 'aws/aws-sam-cli'
5969
runs-on: ubuntu-latest
6070
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+
6181
- name: Checkout SAM
6282
uses: actions/checkout@v6
6383
with:
@@ -117,6 +137,16 @@ jobs:
117137
if: github.repository == 'aws/aws-sam-cli'
118138
runs-on: ubuntu-latest
119139
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+
120150
- name: Checkout Lambda Builders
121151
uses: actions/checkout@v6
122152
with:

0 commit comments

Comments
 (0)