Skip to content

Commit 5a42602

Browse files
committed
fix(ci): update docker workflow to use the new context required by v6
1 parent 329a905 commit 5a42602

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

.github/workflows/docker.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,41 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
15-
if: ${{ contains(github.event.head_commit.message, '[skip ci]') != true }}
14+
- name: Login to Docker Hub
15+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
16+
with:
17+
username: ${{ secrets.DOCKER_USERNAME }}
18+
password: ${{ secrets.DOCKER_PASSWORD }}
19+
20+
- name: Declare some variables
21+
shell: bash
22+
run: |
23+
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
24+
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
1631

1732
- name: Build and push stable Docker image
1833
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
1934
with:
20-
username: ${{ secrets.DOCKER_USERNAME }}
21-
password: ${{ secrets.DOCKER_PASSWORD }}
22-
repository: arkscript/stable
23-
dockerfile: Dockerfile
24-
# tag with the git commit SHA
25-
tag_with_sha: true
26-
tags: latest
35+
file: Dockerfile
36+
tags: arkscript/stable:latest,arkscript/stable:${{ env.sha_short }}
2737
# push the image only if the event that kicked off the workflow was a push of a git tah
2838
push: ${{ startsWith(github.ref, 'refs/tags/') }}
2939

3040
- name: Build and push nightly Docker image
3141
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
3242
with:
33-
username: ${{ secrets.DOCKER_USERNAME }}
34-
password: ${{ secrets.DOCKER_PASSWORD }}
35-
repository: arkscript/nightly
36-
dockerfile: Dockerfile
37-
# tag with the git commit SHA
38-
tag_with_sha: true
39-
tags: latest
43+
file: Dockerfile
44+
tags: arkscript/nightly:latest,arkscript/nightly:${{ env.sha_short }}
4045

4146
- name: Build and push harden Docker image
4247
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
4348
with:
44-
username: ${{ secrets.DOCKER_USERNAME }}
45-
password: ${{ secrets.DOCKER_PASSWORD }}
46-
repository: arkscript/harden
47-
dockerfile: harden.dockerfile
48-
# tag with the git commit SHA
49-
tag_with_sha: true
50-
tags: latest
49+
file: harden.dockerfile
50+
tags: arkscript/harden:latest
51+
push: true

0 commit comments

Comments
 (0)