Skip to content

Commit

Permalink
Migrate docker images to GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Mar 15, 2023
1 parent 12ff096 commit 4104d15
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ jobs:
run: git fetch --force --tags

- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
id: buildx

- name: Login to Docker Hub
uses: docker/login-action@v1
- name: Login to container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

- name: Prepare
id: prep
Expand All @@ -41,7 +42,7 @@ jobs:
echo ::set-output name=VERSION::${VERSION}
- name: Publish multi-arch Catalog Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -51,8 +52,8 @@ jobs:
SERVICE=catalog
platforms: linux/arm64,linux/amd64
tags: |
docker.io/gotwaygateway/catalog:${{ steps.prep.outputs.VERSION }}
docker.io/gotwaygateway/catalog:latest
ghcr.io/${{ github.repository_owner }}/catalog:${{ steps.prep.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/catalog:latest
labels: |
org.opencontainers.image.title=catalog
org.opencontainers.image.description=${{ github.event.repository.description }}
Expand All @@ -63,7 +64,7 @@ jobs:
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
- name: Publish multi-arch Stock Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -73,8 +74,8 @@ jobs:
SERVICE=stock
platforms: linux/arm64,linux/amd64
tags: |
docker.io/gotwaygateway/stock:${{ steps.prep.outputs.VERSION }}
docker.io/gotwaygateway/stock:latest
ghcr.io/${{ github.repository_owner }}/stock:${{ steps.prep.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/stock:latest
labels: |
org.opencontainers.image.title=stock
org.opencontainers.image.description=${{ github.event.repository.description }}
Expand Down

0 comments on commit 4104d15

Please sign in to comment.