File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 5
5
tags :
6
6
- ' v*.*.*'
7
7
8
+ env :
9
+ REGISTRY : ghcr.io
10
+ IMAGE_NAME : ${{ github.repository }}
11
+
8
12
jobs :
9
- docker :
13
+ build-and-push-image :
10
14
runs-on : ubuntu-latest
15
+
16
+ permissions :
17
+ contents : read
18
+ packages : write
19
+
11
20
steps :
12
21
-
13
22
name : Checkout
30
39
with :
31
40
# list of Docker images to use as base name for tags
32
41
images : |
33
- ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
42
+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34
43
# generate Docker tags based on the following events/attributes
35
44
tags : |
36
45
type=semver,pattern={{version}}
47
56
name : Login to DockerHub
48
57
uses : docker/login-action@v3
49
58
with :
50
- username : ${{ secrets.DOCKERHUB_USERNAME }}
51
- password : ${{ secrets.DOCKERHUB_TOKEN }}
59
+ registry : ${{ env.REGISTRY }}
60
+ username : ${{ github.actor }}
61
+ password : ${{ secrets.GITHUB_TOKEN }}
52
62
-
53
63
name : Build and push
54
64
id : docker_build
You can’t perform that action at this time.
0 commit comments