Skip to content

Commit d71dcb1

Browse files
committed
Switch logging-parent refs in CI from hashes to tags
dependabot is not able to update `logging-parent` GHA workflow references that use hashes[1][2]. Switching to tags is safe, since `rel/`-prefixed tags are protected by INFRA. [1] dependabot/dependabot-core#8654 [2] dependabot/dependabot-core#6269
1 parent ee5ac6b commit d71dcb1

File tree

4 files changed

+7
-40
lines changed

4 files changed

+7
-40
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
build:
4040
if: github.actor != 'dependabot[bot]'
41-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
41+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.5.0
4242
with:
4343
java-version: |
4444
8
@@ -48,7 +48,7 @@ jobs:
4848
deploy-snapshot:
4949
needs: build
5050
if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x'
51-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
51+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.5.0
5252
# Secrets for deployments
5353
secrets:
5454
NEXUS_USER: ${{ secrets.NEXUS_USER }}
@@ -61,7 +61,7 @@ jobs:
6161
deploy-release:
6262
needs: build
6363
if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/')
64-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
64+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.5.0
6565
# Secrets for deployments
6666
secrets:
6767
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}

.github/workflows/codeql-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions: read-all
3030
jobs:
3131

3232
analyze:
33-
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
33+
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@rel/10.5.0
3434
with:
3535
java-version: |
3636
8

.github/workflows/merge-dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ jobs:
3030

3131
build:
3232
if: github.repository == 'apache/logging-log4j2' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
33-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@ref/10.5.0
3434
with:
3535
java-version: |
3636
8
3737
17
3838
3939
merge-dependabot:
4040
needs: build
41-
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
41+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/10.5.0
4242
with:
4343
java-version: 17
4444
permissions:

.github/workflows/scorecards-analysis.yaml

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -29,43 +29,10 @@ permissions: read-all
2929
jobs:
3030

3131
analysis:
32-
33-
name: "Scorecards analysis"
34-
runs-on: ubuntu-latest
32+
uses: apache/logging-parent/.github/workflows/scorecards-analysis-reusable.yaml@rel/10.5.0
3533
permissions:
3634
# Needed to upload the results to the code-scanning dashboard.
3735
security-events: write
3836
actions: read
3937
id-token: write # This is required for requesting the JWT
4038
contents: read # This is required for actions/checkout
41-
42-
steps:
43-
44-
- name: "Checkout code"
45-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
46-
with:
47-
persist-credentials: false
48-
49-
- name: "Run analysis"
50-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # 2.3.1
51-
with:
52-
results_file: results.sarif
53-
results_format: sarif
54-
# A read-only PAT token, which is sufficient for the action to function.
55-
# The relevant discussion: https://github.com/ossf/scorecard-action/issues/188
56-
repo_token: ${{ secrets.GITHUB_TOKEN }}
57-
# Publish the results for public repositories to enable scorecard badges.
58-
# For more details: https://github.com/ossf/scorecard-action#publishing-results
59-
publish_results: true
60-
61-
- name: "Upload artifact"
62-
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # 3.1.0
63-
with:
64-
name: SARIF file
65-
path: results.sarif
66-
retention-days: 5
67-
68-
- name: "Upload to code-scanning"
69-
uses: github/codeql-action/upload-sarif@b374143c1149a9115d881581d29b8390bbcbb59c # 2.1.22
70-
with:
71-
sarif_file: results.sarif

0 commit comments

Comments
 (0)