Skip to content

Commit 8f7ff3f

Browse files
authored
feat: enable docker-push on merge to master (#248)
Also updates some gh actions
1 parent f72c7aa commit 8f7ff3f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/publish-docker.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build and Publish Docker
22

33
on:
4+
push:
5+
branches:
6+
- master
47
workflow_dispatch: {}
58

69
env:
@@ -9,7 +12,7 @@ env:
912

1013
jobs:
1114
container:
12-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-latest
1316
permissions:
1417
id-token: write
1518
packages: write
@@ -19,16 +22,16 @@ jobs:
1922
steps:
2023
- name: Checkout repository
2124
id: checkout
22-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2326

2427
- name: Install Docker BuildX
25-
uses: docker/setup-buildx-action@v2
28+
uses: docker/setup-buildx-action@v3
2629
id: buildx
2730
with:
2831
install: true
2932

3033
- name: Log into Docker Hub
31-
uses: docker/login-action@v2
34+
uses: docker/login-action@v3
3235
with:
3336
registry: ${{ env.REGISTRY }}
3437
username: ${{ secrets.DOCKER_USERNAME }}
@@ -40,18 +43,18 @@ jobs:
4043
echo "::set-output name=docker_tags::${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}"
4144
4245
- name: Set up Docker Buildx cache
43-
uses: actions/cache@v2
46+
uses: actions/cache@v4
4447
with:
4548
path: /tmp/.buildx-cache
4649
key: ${{ runner.os }}-buildx-${{ github.sha }}
4750
restore-keys: |
4851
${{ runner.os }}-buildx-
4952
5053
- name: Build and push Docker image
51-
uses: docker/build-push-action@v3
54+
uses: docker/build-push-action@v5
5255
with:
5356
context: .
5457
push: true
5558
tags: ${{ steps.docker_tagging.outputs.docker_tags }}
5659
cache-from: type=local,src=/tmp/.buildx-cache
57-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-to: type=local,dest=/tmp/.buildx-cache

0 commit comments

Comments
 (0)