Skip to content

Commit 05feb7f

Browse files
committed
pin github actions versions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 481e8bc commit 05feb7f

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

content/manuals/build/checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Build and push
77-
uses: docker/build-push-action@{{% param "build_push_action_version" %}}.6.0
77+
uses: docker/build-push-action@{{% param "build_push_action_version" %}}
7878
```
7979
8080
![GitHub Actions build check annotations](./images/gha-check-annotations.png)

content/manuals/dhi/how-to/scan.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ name: DHI Vulnerability Scan
157157

158158
on:
159159
push:
160-
branches: [ main ]
160+
branches:
161+
- main
161162
pull_request:
162-
branches: [ "**" ]
163163

164164
env:
165165
REGISTRY: docker.io
@@ -173,13 +173,12 @@ jobs:
173173
contents: read
174174
packages: write
175175
pull-requests: write
176-
177176
steps:
178177
- name: Checkout repository
179-
uses: actions/checkout@v3
178+
uses: actions/checkout@v6
180179

181180
- name: Set up Docker with containerd image store
182-
uses: docker/setup-docker-action@v4
181+
uses: docker/setup-docker-action@{{% param "setup_docker_action_version" %}}
183182
with:
184183
daemon-config: |
185184
{
@@ -188,22 +187,20 @@ jobs:
188187
}
189188
}
190189
191-
- name: Set up Docker Buildx
192-
uses: docker/setup-buildx-action@{{% param "setup_buildx_action_version" %}}
193-
194190
- name: Log in to Docker Hub
195-
uses: docker/login-action@v2
191+
uses: docker/login-action@{{% param "login_action_version" %}}
196192
with:
193+
registry: ${{ env.REGISTRY }}
197194
username: ${{ secrets.DOCKER_USERNAME }}
198195
password: ${{ secrets.DOCKER_PASSWORD }}
199196

200-
- name: Build Docker image
201-
run: |
202-
docker build \
203-
--provenance=mode=max \
204-
--sbom=true \
205-
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }} .
206-
197+
- name: Build
198+
uses: docker/build-push-action@{{% param "build_push_action_version" %}}
199+
with:
200+
context: .
201+
sbom: true
202+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
203+
207204
- name: Run Docker Scout CVE scan
208205
uses: docker/scout-action@v1
209206
with:
@@ -216,7 +213,6 @@ jobs:
216213
if: success()
217214
run: |
218215
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
219-
220216
```
221217
222218
The `exit-code: true` parameter ensures that the workflow fails if any critical or

content/manuals/scout/policy/ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112

113113
- name: Build image
114114
id: build-and-push
115-
uses: docker/build-push-action@v4
115+
uses: docker/build-push-action@{{% param "build_push_action_version" %}}
116116
with:
117117
tags: ${{ steps.meta.outputs.tags }}
118118
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)