Skip to content

Commit

Permalink
GHCR + Dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jun 28, 2024
1 parent e4c9f32 commit fb8fccd
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/release-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
args: heplify${{ matrix.arch == 'aarch64' && '-arm64' || '' }}

docker-push:
docker-ghcr-push:
if: ${{ github.event_name != 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs: build
Expand All @@ -75,7 +75,7 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/[email protected]
Expand All @@ -91,6 +91,42 @@ jobs:
with:
context: .
file: ./docker/heplify/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

docker-dockerhub-push:
if: ${{ github.event_name != 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs: build
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
qxip/heplify
tags: |
latest
${{ github.ref_name }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./docker/heplify/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit fb8fccd

Please sign in to comment.