Skip to content

Commit 7f5d894

Browse files
authored
Pin GitHub Actions to commit SHAs (opensearch-project#457)
Signed-off-by: Divya Madala <divyaasm@amazon.com>
1 parent 7684001 commit 7f5d894

11 files changed

Lines changed: 35 additions & 35 deletions

.github/workflows/backward-compatible-report.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,32 @@ jobs:
3131
report: ${{ steps.merge_report.outputs.report }}
3232
steps:
3333
- name: Checkout Repository
34-
uses: actions/checkout@v4
34+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3535
with:
3636
repository: ${{ github.repository_owner }}/opensearch-protobufs
3737
ref: main
3838

3939
- name: Setup Node.js
40-
uses: actions/setup-node@v3
40+
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
4141
with:
4242
node-version: 20
4343

4444
- name: Setup Java
45-
uses: actions/setup-java@v3
45+
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
4646
with:
4747
distribution: temurin
4848
java-version: 17
4949

5050
- name: Download OpenAPI spec artifact
5151
if: ${{ inputs.spec_artifact_name != '' }}
52-
uses: actions/download-artifact@v4
52+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5353
with:
5454
name: ${{ inputs.spec_artifact_name }}
5555
path: .
5656

5757
- name: Get Latest OpenSearch Core Version
5858
id: get_opensearch_version
59-
uses: actions/github-script@v6
59+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
6060
with:
6161
github-token: ${{ secrets.GITHUB_TOKEN }}
6262
script: |

.github/workflows/build-protobufs-go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
if: github.repository == 'opensearch-project/opensearch-protobufs'
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1313
- name: build protobufs go
1414
run: bazel build //:go_protos_all

.github/workflows/build-protobufs-java.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
if: github.repository == 'opensearch-project/opensearch-protobufs'
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1818
- name: Set up JDK ${{ matrix.java }}
19-
uses: actions/setup-java@v4
19+
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
2020
with:
2121
distribution: temurin # Temurin is a distribution of adoptium
2222
java-version: ${{ matrix.java }}

.github/workflows/build-protobufs-python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
if: github.repository == 'opensearch-project/opensearch-protobufs'
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1313

14-
- uses: actions/setup-python@v4
14+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4
1515
with:
1616
python-version: '3.11'
1717

.github/workflows/changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
verify-changelog:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1111
with:
1212
token: ${{ secrets.GITHUB_TOKEN }}
1313
ref: ${{ github.event.pull_request.head.sha }}
1414

15-
- uses: dangoslen/changelog-enforcer@v3
15+
- uses: dangoslen/changelog-enforcer@204e7d3ef26579f4cd0fd759c57032656fdf23c7 # v3
1616
with:
1717
skipLabels: 'autocut, skip-changelog'

.github/workflows/cleanup-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
RELEASE_TAG: ${{ inputs.release_tag || github.event.workflow_run.head_branch }}
2929
steps:
3030
- name: Checkout code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3232
with:
3333
ref: main
3434
fetch-depth: 0
@@ -89,7 +89,7 @@ jobs:
8989
EOF
9090
9191
- name: Create Pull Request
92-
uses: peter-evans/create-pull-request@v7
92+
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
9393
with:
9494
token: ${{ secrets.GITHUB_TOKEN }}
9595
commit-message: "Cleanup release ${{ env.RELEASE_TAG }}, prepare ${{ steps.version.outputs.version }}"

.github/workflows/convert-proto.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ jobs:
1919
if: github.repository == 'opensearch-project/opensearch-protobufs'
2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2323

2424
- name: Setup Node.js
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
2626
with:
2727
node-version: 20
2828

2929
- name: Setup Java
30-
uses: actions/setup-java@v3
30+
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
3131
with:
3232
distribution: temurin
3333
java-version: 17
3434

3535
- name: Download Release Assets
36-
uses: robinraju/release-downloader@v1
36+
uses: robinraju/release-downloader@28fc21f50d76778e7023361aa1f863e717d3d56f # v1
3737
with:
3838
repository: 'opensearch-project/opensearch-api-specification'
3939
latest: true
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Get Latest Commit ID
4545
id: get_commit
46-
uses: actions/github-script@v6
46+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
4747
with:
4848
github-token: ${{ secrets.GITHUB_TOKEN }}
4949
script: |
@@ -61,7 +61,7 @@ jobs:
6161
6262
- name: Get Latest OpenSearch Core Version
6363
id: get_opensearch_version
64-
uses: actions/github-script@v6
64+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
6565
with:
6666
github-token: ${{ secrets.GITHUB_TOKEN }}
6767
script: |
@@ -152,14 +152,14 @@ jobs:
152152
153153
- name: Upload protos/schemas diff
154154
if: github.event_name == 'pull_request' && steps.check_changes.outputs.changed == 'true'
155-
uses: actions/upload-artifact@v4
155+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
156156
with:
157157
name: protos-schemas-diff
158158
path: protos-schemas.diff
159159

160160
- name: Create Pull Request if changes exist
161161
if: github.event_name != 'pull_request' && steps.check_changes.outputs.changed == 'true' && github.repository == 'opensearch-project/opensearch-protobufs'
162-
uses: peter-evans/create-pull-request@v7
162+
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
163163
with:
164164
token: ${{ secrets.GITHUB_TOKEN }}
165165
branch: auto-pr-branch

.github/workflows/maven-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
contents: write
1515

1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-java@v4
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
1919
with:
2020
distribution: temurin # Temurin is a distribution of adoptium
2121
java-version: 21
2222

2323
- name: Load secret
24-
uses: 1password/load-secrets-action@v2
24+
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2
2525
with:
2626
# Export loaded secrets as environment variables
2727
export-env: true
@@ -31,7 +31,7 @@ jobs:
3131
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
3232

3333
- name: Configure AWS credentials
34-
uses: aws-actions/configure-aws-credentials@v5
34+
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5
3535
with:
3636
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
3737
aws-region: us-east-1

.github/workflows/publish-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
permissions: write-all
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2323

2424
- name: Set up JDK 21
25-
uses: actions/setup-java@v4
25+
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
2626
with:
2727
java-version: 21
2828
distribution: 'temurin'
2929
cache: gradle
3030

3131
- name: Set up Python 3
32-
uses: actions/setup-python@v6
32+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
3333
with:
3434
python-version: '3.10'
3535

@@ -49,10 +49,10 @@ jobs:
4949
mv bazel-bin/opensearch_protobufs-*-py3-none-any.whl dist/
5050
5151
- name: Publish python artifacts to PyPI
52-
uses: pypa/gh-action-pypi-publish@release/v1
52+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
5353

5454
- name: Release on Github
55-
uses: softprops/action-gh-release@v2
55+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
5656
with:
5757
draft: true
5858
generate_release_notes: true

.github/workflows/remove-pr-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'opensearch-project/opensearch-protobufs' && github.event.pull_request.head.ref == 'auto-pr-branch'
1313
steps:
1414
- name: Delete merged branch
15-
uses: actions/github-script@v7
15+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
1616
with:
1717
script: |
1818
github.rest.git.deleteRef({

0 commit comments

Comments
 (0)