Skip to content

Commit

Permalink
Use SHA instead of versions in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Jan 17, 2025
1 parent 7baa795 commit 3375a0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
steps:
# Checkout target branch which has trusted code
- name: Check out target branch
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
persist-credentials: false
ref: ${{ github.ref }}
- name: Set up Java 21
uses: actions/setup-java@v4
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # 4.6.0
with:
java-version: 21
distribution: temurin
# https://github.com/actions/cache/blob/main/examples.md#java---maven
- name: Cache local Maven repository
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # 4.2.0
with:
path: ~/.m2/repository
# use a different key than workflows running untrusted code
Expand All @@ -42,7 +42,7 @@ jobs:
run: ./mvnw -v
- name: Download GitHub Actions artifacts for the Develocity build scans
id: downloadBuildScan
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
with:
pattern: build-scan-data-*
github-token: ${{ github.token }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ jobs:
- name: Support longpaths on Windows
if: "startsWith(matrix.os.runs-on, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
persist-credentials: false
# Fetch the whole history to make sure that gitflow incremental builder
# can find the base commit.
fetch-depth: 0
- name: Set up Java ${{ matrix.os.java.version }}
uses: actions/setup-java@v4
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # 4.6.0
with:
java-version: ${{ matrix.os.java.version }}
distribution: temurin
# https://github.com/actions/cache/blob/main/examples.md#java---maven
- name: Cache local Maven repository
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # 4.2.0
with:
path: ~/.m2/repository
# use a different key than workflows running in trusted mode
Expand All @@ -118,7 +118,7 @@ jobs:
# The actual publishing must be done in a separate job (see ci-report.yml).
# We don't write to the remote cache as that would be unsafe.
- name: Upload GitHub Actions artifact for the Develocity build scan
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
if: "${{ github.event_name == 'pull_request' && !cancelled() }}"
with:
name: build-scan-data-initial-${{ matrix.os.name }}
Expand All @@ -133,7 +133,7 @@ jobs:
DEVELOCITY_ACCESS_KEY: "${{ secrets.DEVELOCITY_ACCESS_KEY || '' }}"
# Same as above, but for the build scan of the latest Maven run.
- name: Upload GitHub Actions artifact for the Develocity build scan
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
if: "${{ github.event_name == 'pull_request' && !cancelled() }}"
with:
name: build-scan-data-integrationtest-${{ matrix.os.name }}
Expand Down

0 comments on commit 3375a0f

Please sign in to comment.