Skip to content

Commit b7e1c0f

Browse files
committed
ci: github registry for docker
1 parent b7267b4 commit b7e1c0f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/docker_dispatch.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ name: Docker
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
packages: write
8+
69
jobs:
710
docker-build:
811
name: Docker
912
runs-on: ubuntu-latest
10-
environment: Docker
1113
steps:
1214
- uses: actions/checkout@v3
1315
- uses: docker/setup-qemu-action@v2
@@ -35,16 +37,17 @@ jobs:
3537
echo "minor=$MINOR" >> $GITHUB_OUTPUT
3638
REVISION=`echo $REVISION | cut -d. -f3`
3739
echo "revision=$REVISION" >> $GITHUB_OUTPUT
38-
- name: Login to Docker Hub
40+
- name: Login to Registry
3941
uses: docker/login-action@v2
4042
with:
41-
username: ${{ secrets.DOCKERHUB_USERNAME }}
42-
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
4346
- name: Docker metadata
4447
id: meta
4548
uses: docker/metadata-action@v4
4649
with:
47-
images: vbersier/awsbck
50+
images: ghcr.io/${{ github.repository_owner }}/awsbck
4851
flavor: |
4952
latest=true
5053
tags: |
@@ -63,7 +66,7 @@ jobs:
6366
id: meta-root
6467
uses: docker/metadata-action@v4
6568
with:
66-
images: vbersier/awsbck
69+
images: ghcr.io/${{ github.repository_owner }}/awsbck
6770
flavor: |
6871
latest=false
6972
tags: |

0 commit comments

Comments
 (0)