1
1
name : Build and Publish Docker
2
2
3
3
on :
4
+ push :
5
+ branches :
6
+ - master
4
7
workflow_dispatch : {}
5
8
6
9
env :
9
12
10
13
jobs :
11
14
container :
12
- runs-on : ubuntu-20.04
15
+ runs-on : ubuntu-latest
13
16
permissions :
14
17
id-token : write
15
18
packages : write
@@ -19,16 +22,16 @@ jobs:
19
22
steps :
20
23
- name : Checkout repository
21
24
id : checkout
22
- uses : actions/checkout@v3
25
+ uses : actions/checkout@v4
23
26
24
27
- name : Install Docker BuildX
25
- uses : docker/setup-buildx-action@v2
28
+ uses : docker/setup-buildx-action@v3
26
29
id : buildx
27
30
with :
28
31
install : true
29
32
30
33
- name : Log into Docker Hub
31
- uses : docker/login-action@v2
34
+ uses : docker/login-action@v3
32
35
with :
33
36
registry : ${{ env.REGISTRY }}
34
37
username : ${{ secrets.DOCKER_USERNAME }}
@@ -40,18 +43,18 @@ jobs:
40
43
echo "::set-output name=docker_tags::${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}"
41
44
42
45
- name : Set up Docker Buildx cache
43
- uses : actions/cache@v2
46
+ uses : actions/cache@v4
44
47
with :
45
48
path : /tmp/.buildx-cache
46
49
key : ${{ runner.os }}-buildx-${{ github.sha }}
47
50
restore-keys : |
48
51
${{ runner.os }}-buildx-
49
52
50
53
- name : Build and push Docker image
51
- uses : docker/build-push-action@v3
54
+ uses : docker/build-push-action@v5
52
55
with :
53
56
context : .
54
57
push : true
55
58
tags : ${{ steps.docker_tagging.outputs.docker_tags }}
56
59
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