Commit e6c30da 1 parent aa75929 commit e6c30da Copy full SHA for e6c30da
File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,38 @@ jobs:
28
28
username : ${{ secrets.DOCKER_USERNAME }}
29
29
password : ${{ secrets.DOCKER_PASSWORD }}
30
30
31
+ - name : Log in to GHCR
32
+ run : |
33
+ echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
34
+ env :
35
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
+
31
37
- name : publish-latest
32
38
run : |
33
- docker tag contentful-labs/coredns-nodecache:latest contentful/latest
39
+ # Dockerhub
40
+ docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:latest
34
41
docker push contentful/coredns-nodecache:latest
42
+ # GHCR
43
+ docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:latest
44
+ docker push ghcr.io/contentful-labs/coredns-nodecache:latest
35
45
if : github.ref == 'refs/heads/master'
36
46
37
47
- name : publish-branch
38
48
run : |
49
+ # Dockerhub
39
50
docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/}
40
51
docker push contentful/coredns-nodecache:${GITHUB_REF##*/}
52
+ # GHCR
53
+ docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
54
+ docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
41
55
if : startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master'
42
56
43
57
- name : publish-tag
44
58
run : |
59
+ # Dockerhub
45
60
docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/}
46
61
docker push contentful/coredns-nodecache:${GITHUB_REF##*/}
62
+ # GHCR
63
+ docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
64
+ docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
47
65
if : startsWith(github.ref, 'refs/tags/v')
You can’t perform that action at this time.
0 commit comments