Skip to content

Commit 7505041

Browse files
danfiedler-msftcmaneu
authored andcommitted
Pin GitHub Actions to full-length commit SHAs
1 parent fa4bfc7 commit 7505041

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
groups:
6+
github-actions:
7+
patterns: ["*"]
8+
schedule:
9+
interval: "weekly"
10+
cooldown:
11+
default-days: 7

.github/workflows/docker-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2727

2828
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v3
29+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
3030

3131
- name: Log in to Container Registry
3232
if: github.event_name != 'pull_request'
33-
uses: docker/login-action@v3
33+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3434
with:
3535
registry: ${{ env.REGISTRY }}
3636
username: ${{ github.actor }}
3737
password: ${{ secrets.GITHUB_TOKEN }}
3838

3939
- name: Extract metadata (tags, labels)
4040
id: meta
41-
uses: docker/metadata-action@v5
41+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
4242
with:
4343
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4444
tags: |
@@ -52,7 +52,7 @@ jobs:
5252
5353
- name: Build and push Docker image
5454
id: build
55-
uses: docker/build-push-action@v5
55+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
5656
with:
5757
context: .
5858
push: ${{ github.event_name != 'pull_request' }}
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Generate artifact attestation
6666
if: github.event_name != 'pull_request'
67-
uses: actions/attest-build-provenance@v1
67+
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4
6868
with:
6969
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7070
subject-digest: ${{ steps.build.outputs.digest }}

0 commit comments

Comments
 (0)