Skip to content

Commit 93116db

Browse files
Miqueasherthpierce
andauthored
Updating JS release workflows & actions 3p actions from version ID to commit ID (#264)
This pr updates the JS release workflows & actions 3p actions from version ID to commit ID. References: https://github.com/actions/checkout https://github.com/aws-actions/configure-aws-credentials https://github.com/actions/setup-node https://github.com/hashicorp/setup-terraform https://github.com/github/codeql-action https://github.com/docker/login-action https://github.com/docker/setup-buildx-action https://github.com/docker/build-push-action https://github.com/aws-actions/aws-secretsmanager-get-secrets By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Thomas Pierce <[email protected]>
1 parent 05245a6 commit 93116db

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.30.3
62+
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
6363
with:
6464
languages: ${{ matrix.language }}
6565
build-mode: ${{ matrix.build-mode }}
@@ -87,6 +87,6 @@ jobs:
8787
exit 1
8888
8989
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.30.3
90+
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
9191
with:
9292
category: "/language:${{matrix.language}}"

.github/workflows/post-release-version-bump.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout main
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2828
with:
2929
ref: main
3030
fetch-depth: 0
@@ -63,21 +63,21 @@ jobs:
6363
needs: check-version
6464
steps:
6565
- name: Configure AWS credentials for BOT secrets
66-
uses: aws-actions/configure-aws-credentials@v4
66+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
6767
with:
6868
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
6969
aws-region: ${{ env.AWS_DEFAULT_REGION }}
7070

7171
- name: Get Bot secrets
72-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
72+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
7373
id: bot_secrets
7474
with:
7575
secret-ids: |
7676
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
7777
parse-json-secrets: true
7878

7979
- name: Setup Git
80-
uses: actions/checkout@v2
80+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
8181
with:
8282
fetch-depth: 0
8383
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
@@ -99,7 +99,7 @@ jobs:
9999
git checkout -b "prepare-main-for-next-dev-cycle-${VERSION}" origin/$RELEASE_BRANCH
100100
101101
- name: Set up node
102-
uses: actions/setup-node@v4
102+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
103103
with:
104104
node-version: 20
105105

.github/workflows/pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
changelog-check:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2323
with:
2424
fetch-depth: 0
2525

.github/workflows/pre-release-prepare.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Configure AWS credentials for BOT secrets
28-
uses: aws-actions/configure-aws-credentials@v4
28+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
2929
with:
3030
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
3131
aws-region: ${{ env.AWS_DEFAULT_REGION }}
3232

3333
- name: Get Bot secrets
34-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
34+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
3535
id: bot_secrets
3636
with:
3737
secret-ids: |
3838
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
3939
parse-json-secrets: true
4040

4141
- name: Checkout main branch
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
4343
with:
4444
ref: 'main'
4545
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
@@ -89,7 +89,7 @@ jobs:
8989
git push origin "v${VERSION}_release"
9090
9191
- name: Set up node
92-
uses: actions/setup-node@v4
92+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
9393
with:
9494
node-version: 20
9595

.github/workflows/release-build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
3030

3131
- name: Check main build status
3232
env:
@@ -61,31 +61,31 @@ jobs:
6161
# https://github.com/aws-observability/aws-otel-java-instrumentation/tree/93870a550ac30988fbdd5d3bf1e8f9f1b37916f5/smoke-tests
6262

6363
- name: Configure AWS credentials for private ECR
64-
uses: aws-actions/configure-aws-credentials@v4
64+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
6565
with:
6666
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
6767
aws-region: ${{ env.AWS_PRIVATE_ECR_REGION }}
6868

6969
- name: Log in to AWS private ECR
70-
uses: docker/login-action@v3
70+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
7171
with:
7272
registry: ${{ env.RELEASE_PRIVATE_REGISTRY }}
7373

7474
- name: Configure AWS credentials for public ECR
75-
uses: aws-actions/configure-aws-credentials@v4
75+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
7676
with:
7777
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ECR_RELEASE }}
7878
aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }}
7979

8080
- name: Log in to AWS public ECR
81-
uses: docker/login-action@v3
81+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
8282
with:
8383
registry: public.ecr.aws
8484

8585

8686
# Publish to public ECR
8787
- name: Build and push public ECR image
88-
uses: docker/build-push-action@v5
88+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
8989
with:
9090
push: true
9191
context: .
@@ -96,7 +96,7 @@ jobs:
9696
9797
# Publish to private ECR
9898
- name: Build and push private ECR image
99-
uses: docker/build-push-action@v5
99+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
100100
with:
101101
push: true
102102
context: .

.github/workflows/release-lambda.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141
echo ${MATRIX}
4242
echo "aws_regions_json=${MATRIX}" >> $GITHUB_OUTPUT
4343
- name: Checkout Repo @ SHA - ${{ github.sha }}
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
4545
- name: Setup Node
46-
uses: actions/setup-node@v4
46+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
4747
with:
4848
node-version: 22
4949
- name: NPM Clean Install
@@ -54,7 +54,7 @@ jobs:
5454
- name: Build Lambda Layer
5555
run: npm run build-lambda
5656
- name: upload layer
57-
uses: actions/upload-artifact@v4
57+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
5858
with:
5959
name: layer.zip
6060
path: lambda-layer/packages/layer/build/layer.zip
@@ -86,7 +86,7 @@ jobs:
8686
fi
8787
SECRET_KEY=${SECRET_KEY//-/_}
8888
echo "SECRET_KEY=${SECRET_KEY}" >> $GITHUB_ENV
89-
- uses: aws-actions/configure-aws-credentials@v4.0.2
89+
- uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
9090
with:
9191
role-to-assume: ${{ secrets[env.SECRET_KEY] }}
9292
role-duration-seconds: 1200
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
echo BUCKET_NAME=nodejs-lambda-layer-${{ github.run_id }}-${{ matrix.aws_region }} | tee --append $GITHUB_ENV
9797
- name: download layer.zip
98-
uses: actions/download-artifact@v4
98+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
9999
with:
100100
name: layer.zip
101101
- name: publish
@@ -133,7 +133,7 @@ jobs:
133133
--action lambda:GetLayerVersion
134134
- name: upload layer arn artifact
135135
if: ${{ success() }}
136-
uses: actions/upload-artifact@v4
136+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
137137
with:
138138
name: ${{ env.LAYER_NAME }}-${{ matrix.aws_region }}
139139
path: ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
@@ -146,10 +146,10 @@ jobs:
146146
needs: publish-prod
147147
steps:
148148
- name: Checkout Repo @ SHA - ${{ github.sha }}
149-
uses: actions/checkout@v4
150-
- uses: hashicorp/setup-terraform@v2
149+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
150+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd #v3.1.2
151151
- name: download layerARNs
152-
uses: actions/download-artifact@v4
152+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
153153
with:
154154
pattern: ${{ env.LAYER_NAME }}-*
155155
path: ${{ env.LAYER_NAME }}
@@ -199,7 +199,7 @@ jobs:
199199
echo "}" >> ../layer_cdk
200200
cat ../layer_cdk
201201
- name: download layer.zip
202-
uses: actions/download-artifact@v4
202+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
203203
with:
204204
name: layer.zip
205205
- name: Get commit hash

0 commit comments

Comments
 (0)