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 :
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 :
7292 repository : aws/aws-sam-cli
7393 path : aws-sam-cli
7494
95+ - uses : actions/setup-python@v6
96+ with :
97+ python-version : " 3.11"
98+
99+ - name : Install uv
100+ uses : astral-sh/setup-uv@v7
101+
75102 - name : Update aws-sam-translator & commit
76103 run : |
77104 git config --global user.email "action@github.com"
86113 git reset --hard develop
87114 sed -i "s/$SAM_T_PRE_VERSION/aws-sam-translator==$SAM_T_CUR_VERSION/g" requirements/base.txt
88115 cp -r ../serverless-application-model/tests/translator/input ./tests/functional/commands/validate/lib/models
116+ make update-reproducible-reqs-uv
89117 git status
90118 git diff --quiet && exit 0 # exit if there is no change
91119 echo "is_new_sam_t=1" >> $GITHUB_ENV # set env variable for next step run decision
@@ -109,6 +137,16 @@ jobs:
109137 if : github.repository == 'aws/aws-sam-cli'
110138 runs-on : ubuntu-latest
111139 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+
112150 - name : Checkout Lambda Builders
113151 uses : actions/checkout@v6
114152 with :
@@ -123,6 +161,13 @@ jobs:
123161 repository : aws/aws-sam-cli
124162 path : aws-sam-cli
125163
164+ - uses : actions/setup-python@v6
165+ with :
166+ python-version : " 3.11"
167+
168+ - name : Install uv
169+ uses : astral-sh/setup-uv@v7
170+
126171 - name : Upgrade aws_lambda_builders & commit
127172 run : |
128173 git config --global user.email "action@github.com"
@@ -136,6 +181,7 @@ jobs:
136181 echo "Lambda Builders pre version is $BUILDERS_PRE_VERSION"
137182 git reset --hard develop
138183 sed -i "s/$BUILDERS_PRE_VERSION/aws_lambda_builders==$BUILDERS_CUR_VERSION/g" requirements/base.txt
184+ make update-reproducible-reqs-uv
139185 git status
140186 git diff --quiet && exit 0 # exit if there is no change
141187 echo "is_new_lambda_builders=1" >> $GITHUB_ENV # set env variable for next step run decision
0 commit comments