Skip to content

Commit 705decc

Browse files
[Github] Hash Pin Actions in Most Workflows (#129486)
This patch haspins all actions in most of the LLVM Github workflows. This is something we try to do, but no one has gone through and combed through all of the workflows before this patch. Notably, this patch does not bump any major versions of actions just in case there are subtle breaking changes introduced between versions that could impact us. Also, this patch omits the libc/libc++ workflows so that they can be split into separate PRs for the respective subproject maintainers to review.
1 parent a3584fb commit 705decc

21 files changed

+39
-39
lines changed

.github/workflows/build-metrics-container.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
container-filename: ${{ steps.vars.outputs.container-filename }}
2828
steps:
2929
- name: Checkout LLVM
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131
with:
3232
sparse-checkout: .ci/metrics/
3333
- name: Write Variables
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
podman save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
5151
- name: Upload Container Image
52-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
5353
with:
5454
name: container
5555
path: ${{ steps.vars.outputs.container-filename }}
@@ -66,7 +66,7 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
steps:
6868
- name: Download Container
69-
uses: actions/download-artifact@v4
69+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
7070
with:
7171
name: container
7272
- name: Push Container

.github/workflows/ci-post-commit-analyzer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4545

4646
- name: Setup ccache
47-
uses: hendrikmuhs/ccache-action@v1
47+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
4848
with:
4949
# A full build of llvm, clang, lld, and lldb takes about 250MB
5050
# of ccache space. There's not much reason to have more than this,

.github/workflows/commit-access-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-22.04
1616
steps:
1717
- name: Fetch LLVM sources
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919

2020
- name: Install dependencies
2121
run: |

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ jobs:
6060
# a local checkout beforehand.
6161
- name: Fetch LLVM sources (Push)
6262
if: ${{ github.event_name == 'push' }}
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6464
with:
6565
fetch-depth: 1
6666
- name: Get subprojects that have doc changes
6767
id: docs-changed-subprojects
68-
uses: tj-actions/changed-files@v39
68+
uses: tj-actions/changed-files@fea790cb660e33aef4bdf07304e28fedd77dfa13 # v39.2.4
6969
with:
7070
files_yaml: |
7171
llvm:
@@ -98,11 +98,11 @@ jobs:
9898
- '.github/workflows/docs.yml'
9999
- name: Fetch LLVM sources (PR)
100100
if: ${{ github.event_name == 'pull_request' }}
101-
uses: actions/checkout@v4
101+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
102102
with:
103103
fetch-depth: 1
104104
- name: Setup Python env
105-
uses: actions/setup-python@v5
105+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
106106
with:
107107
python-version: '3.11'
108108
cache: 'pip'
@@ -216,7 +216,7 @@ jobs:
216216
mkdir built-docs/flang
217217
cp -r flang-build/docs/* built-docs/flang/
218218
- name: Upload docs
219-
uses: actions/upload-artifact@v4
219+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
220220
with:
221221
name: docs-output
222222
path: built-docs/

.github/workflows/email-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'llvm/llvm-project'
1515
steps:
1616
- name: Fetch LLVM sources
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
with:
1919
ref: ${{ github.event.pull_request.head.sha }}
2020

.github/workflows/issue-release-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
4343
steps:
4444
- name: Fetch LLVM sources
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4646
with:
4747
repository: llvm/llvm-project
4848
# GitHub stores the token used for checkout and uses it for pushes

.github/workflows/issue-subscriber.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'llvm/llvm-project'
1515
steps:
1616
- name: Checkout Automation Script
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
with:
1919
sparse-checkout: llvm/utils/git/
2020
ref: main

.github/workflows/issue-write.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
)
2626
steps:
2727
- name: Fetch Sources
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929
with:
3030
sparse-checkout: |
3131
.github/workflows/unprivileged-download-artifact/action.yml
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: 'Comment on PR'
4141
if: steps.download-artifact.outputs.artifact-id != ''
42-
uses: actions/github-script@v3
42+
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
4343
with:
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
script: |

.github/workflows/libclang-abi-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
3939
steps:
4040
- name: Checkout source
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242
with:
4343
fetch-depth: 250
4444

.github/workflows/llvm-bugs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
if: github.repository == 'llvm/llvm-project'
1616
steps:
17-
- uses: actions/setup-node@v4
17+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
1818
with:
1919
node-version: 18
2020
check-latest: true
2121
- run: npm install mailgun.js form-data
2222
- name: Send notification
23-
uses: actions/github-script@v6
23+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
2424
env:
2525
MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }}
2626
with:

.github/workflows/llvm-project-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
# lldb. Using this setup-python action to make 3.10 the default
8383
# python fixes this.
8484
- name: Setup Python
85-
uses: actions/setup-python@v5
85+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
8686
with:
8787
python-version: ${{ inputs.python_version }}
8888
- name: Install Ninja
@@ -91,11 +91,11 @@ jobs:
9191
# actions/checkout deletes any existing files in the new git directory,
9292
# so this needs to either run before ccache-action or it has to use
9393
# clean: false.
94-
- uses: actions/checkout@v4
94+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9595
with:
9696
fetch-depth: 250
9797
- name: Setup ccache
98-
uses: hendrikmuhs/ccache-action@v1
98+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
9999
with:
100100
# A full build of llvm, clang, lld, and lldb takes about 250MB
101101
# of ccache space. There's not much reason to have more than this,

.github/workflows/llvm-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
3939
steps:
4040
- name: Checkout source
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242
with:
4343
fetch-depth: 250
4444

.github/workflows/merged-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
(github.event.pull_request.merged == true)
2222
steps:
2323
- name: Checkout Automation Script
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525
with:
2626
sparse-checkout: llvm/utils/git/
2727
ref: main

.github/workflows/new-prs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
(github.event.pull_request.author_association != 'OWNER')
3636
steps:
3737
- name: Checkout Automation Script
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3939
with:
4040
sparse-checkout: llvm/utils/git/
4141
ref: main
@@ -67,7 +67,7 @@ jobs:
6767
github.event.pull_request.draft == false &&
6868
github.event.pull_request.commits < 10
6969
steps:
70-
- uses: actions/labeler@v4
70+
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
7171
with:
7272
configuration-path: .github/new-prs-labeler.yml
7373
# workaround for https://github.com/actions/labeler/issues/112

.github/workflows/pr-code-format.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@ jobs:
1919
if: github.repository == 'llvm/llvm-project'
2020
steps:
2121
- name: Fetch LLVM sources
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
2424
ref: ${{ github.event.pull_request.head.sha }}
2525

2626
- name: Checkout through merge base
27-
uses: rmacklin/fetch-through-merge-base@v0
27+
uses: rmacklin/fetch-through-merge-base@bfe4d03a86f9afa52bc1a70e9814fc92a07f7b75 # v0.3.0
2828
with:
2929
base_ref: ${{ github.event.pull_request.base.ref }}
3030
head_ref: ${{ github.event.pull_request.head.sha }}
3131
deepen_length: 500
3232

3333
- name: Get changed files
3434
id: changed-files
35-
uses: tj-actions/changed-files@v39
35+
uses: tj-actions/changed-files@fea790cb660e33aef4bdf07304e28fedd77dfa13 # v39.2.4
3636
with:
3737
separator: ","
3838
skip_initial_fetch: true
3939

4040
# We need to pull the script from the main branch, so that we ensure
4141
# we get the latest version of this script.
4242
- name: Fetch code formatting utils
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4444
with:
4545
repository: ${{ github.repository }}
4646
ref: ${{ github.base_ref }}
@@ -58,12 +58,12 @@ jobs:
5858
echo "$CHANGED_FILES"
5959
6060
- name: Install clang-format
61-
uses: aminya/setup-cpp@v1
61+
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
6262
with:
6363
clangformat: 19.1.6
6464

6565
- name: Setup Python env
66-
uses: actions/setup-python@v5
66+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
6767
with:
6868
python-version: '3.11'
6969
cache: 'pip'

.github/workflows/pr-subscriber.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'llvm/llvm-project'
1515
steps:
1616
- name: Checkout Automation Script
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
with:
1919
sparse-checkout: llvm/utils/git/
2020
ref: main

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ jobs:
336336
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
337337
steps:
338338
- name: Checkout Actions
339-
uses: actions/checkout@v4
339+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
340340
with:
341341
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
342342
sparse-checkout: |

.github/workflows/release-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3838

3939
- name: Setup Python env
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4141
with:
4242
cache: 'pip'
4343
cache-dependency-path: './llvm/docs/requirements.txt'

.github/workflows/release-doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4444

4545
- name: Setup Python env
46-
uses: actions/setup-python@v5
46+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4747
with:
4848
cache: 'pip'
4949
cache-dependency-path: './llvm/docs/requirements.txt'

.github/workflows/release-lit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
4646
4747
- name: Setup Cpp
48-
uses: aminya/setup-cpp@v1
48+
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
4949
with:
5050
compiler: llvm-16.0.6
5151
cmake: true
@@ -66,14 +66,14 @@ jobs:
6666
python3 setup.py sdist bdist_wheel
6767
6868
- name: Upload lit to test.pypi.org
69-
uses: pypa/gh-action-pypi-publish@release/v1
69+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7070
with:
7171
password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
7272
repository-url: https://test.pypi.org/legacy/
7373
packages-dir: llvm/utils/lit/dist/
7474

7575
- name: Upload lit to pypi.org
76-
uses: pypa/gh-action-pypi-publish@release/v1
76+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7777
with:
7878
password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
7979
packages-dir: llvm/utils/lit/dist/

.github/workflows/version-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Fetch LLVM sources
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
2222
fetch-depth: 0
2323

0 commit comments

Comments
 (0)