Skip to content

Commit

Permalink
chore: Ping GH actions to a GitSHA (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaangiolillo authored Jan 22, 2024
1 parent 4910dfd commit 73aa2b6
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 62 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- name: Install dependencies
Expand All @@ -29,14 +29,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
shell: bash
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- name: Install dependencies
Expand All @@ -47,9 +47,9 @@ jobs:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Run ShellCheck
uses: bewuethr/shellcheck-action@v2
uses: bewuethr/shellcheck-action@a7092784dbc0f7b2139dd8396ab357fe4678e958
call-package-workflow:
needs: [compile, lint, shellcheck]
secrets: inherit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Dependency Review
uses: actions/dependency-review-action@v4
uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976
2 changes: 1 addition & 1 deletion .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
echo "The following JIRA ticket has been created: ${JIRA_TICKET_ID}"
echo "jira-ticket-id=${JIRA_TICKET_ID}" >> "${GITHUB_OUTPUT}"
- name: Add comment
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2
with:
issue-number: ${{ github.event.issue.number }}
body: |
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- name: Install dependencies
Expand All @@ -32,7 +32,7 @@ jobs:
git diff --staged --patch --exit-code > .repo.patch || echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}"
- name: Upload patch
if: steps.self_mutation.outputs.self_mutation_happened
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: .repo.patch
path: .repo.patch
Expand All @@ -46,7 +46,7 @@ jobs:
run: cd dist && rm -rf submodules/ && getfacl -R . > permissions-backup.acl
continue-on-error: true
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: build-artifact
path: dist
Expand All @@ -56,11 +56,11 @@ jobs:
permissions: {}
if: "! needs.build.outputs.self_mutation_happened"
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -79,15 +79,15 @@ jobs:
permissions: {}
if: "! needs.build.outputs.self_mutation_happened"
steps:
- uses: actions/setup-java@v4
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: temurin
java-version: 11.x
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -106,14 +106,14 @@ jobs:
permissions: {}
if: "! needs.build.outputs.self_mutation_happened"
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- uses: actions/setup-python@v5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
with:
python-version: 3.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -132,14 +132,14 @@ jobs:
permissions: {}
if: "! needs.build.outputs.self_mutation_happened"
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2
with:
dotnet-version: 3.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -158,14 +158,14 @@ jobs:
permissions: {}
if: "! needs.build.outputs.self_mutation_happened"
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 18.x
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ^1.16.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -35,7 +35,7 @@ jobs:
revert
style
requireScope: false
- uses: marocchino/sticky-pull-request-comment@v2
- uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
Expand All @@ -53,7 +53,7 @@ jobs:
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
with:
header: pr-title-lint-error
delete: true
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Set git config safe.directory
Expand All @@ -20,7 +20,7 @@ jobs:
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- name: Install dependencies
Expand All @@ -31,7 +31,7 @@ jobs:
run: cd dist && rm -rf submodules/ && getfacl -R . > permissions-backup.acl
continue-on-error: true
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: build-artifact
path: dist
Expand All @@ -43,11 +43,11 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -74,7 +74,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
with:
labels: failed-release
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to npm failed
Expand All @@ -87,15 +87,15 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/setup-java@v4
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: temurin
java-version: 11.x
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
with:
labels: failed-release
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to Maven Central failed
Expand All @@ -137,14 +137,14 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- uses: actions/setup-python@v5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
with:
python-version: 3.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -170,7 +170,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
with:
labels: failed-release
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to PyPI failed
Expand All @@ -183,14 +183,14 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2
with:
dotnet-version: 3.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -215,7 +215,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
with:
labels: failed-release
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to NuGet Gallery failed
Expand All @@ -228,14 +228,14 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ^1.16.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -262,7 +262,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
with:
labels: failed-release
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Go Module Repository failed
Expand All @@ -275,11 +275,11 @@ jobs:
contents: write
issues: write
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 16.14.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: build-artifact
path: dist
Expand All @@ -302,7 +302,7 @@ jobs:
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
- name: Create Issue
if: ${{ failure() }}
uses: imjohnbo/issue-bot@v3
uses: imjohnbo/issue-bot@6924a99d928dc228f407d34eb3d0149eda73f2a7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
Loading

0 comments on commit 73aa2b6

Please sign in to comment.