Skip to content

Commit

Permalink
feat: Release to GHCR
Browse files Browse the repository at this point in the history
This is a squash containing:

fix: ci: merge GHCR+Docker Hub developer image workflow

ci: release: combine GHCR and DockerHub releases
  • Loading branch information
USA-RedDragon committed Feb 11, 2024
1 parent 8fdc434 commit accabec
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker - GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker - Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: type=raw,value=dev
flavor: latest=false

Expand Down Expand Up @@ -50,11 +59,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker - GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker - Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: type=raw,value=dev-arm64
flavor: latest=false

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy
types: [published]

jobs:
# Builds the Dockerfile and pushes it to dockerhub
# Builds the Dockerfile and pushes it to dockerhub and GHCR
release-amd64:
name: Release - Docker image
runs-on: ubuntu-latest
Expand All @@ -19,11 +19,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker - GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker - Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern=v{{version}}
Expand All @@ -39,7 +48,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}

# Builds the Dockerfile.arm64 and pushes it to dockerhub
# Builds the Dockerfile.arm64 and pushes it to dockerhub and GHCR
release-arm64:
name: Release - Docker image
runs-on: ubuntu-latest
Expand All @@ -63,7 +72,9 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern=v{{version}}-arm64
Expand Down

0 comments on commit accabec

Please sign in to comment.