Skip to content

Commit 9481a16

Browse files
committed
ci: Push images to Github container registry instead of Docker Hub
1 parent d0451a6 commit 9481a16

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,16 @@ jobs:
3333
if: ${{ inputs.push == true }}
3434
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
3535
with:
36-
username: ${{ vars.DOCKERHUB_USERNAME }}
37-
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
3839
- name: Extract metadata (tags, labels) for Docker
3940
if: ${{ inputs.push == true }}
4041
id: meta
4142
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
4243
with:
43-
images: totara/docker-dev-${{ inputs.image }}
44-
tags: |
45-
type=raw,latest
46-
type=semver,pattern={{version}}
44+
images: ghcr.io/totara/docker-dev-${{ inputs.image }}
45+
tags: type=raw,latest
4746
- name: Set up QEMU (to support building for both amd64 and arm64)
4847
if: ${{ inputs.multiarch == true }}
4948
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

.github/workflows/build-mssql.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
- master
1010
paths:
1111
- mssql/**
12-
- ./.github/workflows/build-image.yml
12+
- .github/workflows/build-image.yml
13+
- .github/workflows/build-mssql.yml
1314

1415
jobs:
1516
build-mssql-images:

.github/workflows/build-php.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ on:
1010
paths:
1111
- php/**
1212
- '!php/includes/**'
13-
- ./.github/workflows/build-image.yml
13+
- .github/workflows/build-image.yml
14+
- .github/workflows/build-php.yml
1415

1516
jobs:
1617
build-php-images:

0 commit comments

Comments
 (0)