Skip to content

Commit fb8fccd

Browse files
authored
GHCR + Dockerhub
1 parent e4c9f32 commit fb8fccd

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

.github/workflows/release-alpine.yml

+39-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
args: heplify${{ matrix.arch == 'aarch64' && '-arm64' || '' }}
6161

62-
docker-push:
62+
docker-ghcr-push:
6363
if: ${{ github.event_name != 'workflow_dispatch' }}
6464
runs-on: ubuntu-latest
6565
needs: build
@@ -75,7 +75,7 @@ jobs:
7575
registry: ${{ env.REGISTRY }}
7676
username: ${{ github.actor }}
7777
password: ${{ secrets.GITHUB_TOKEN }}
78-
78+
7979
- name: Docker meta
8080
id: meta
8181
uses: docker/[email protected]
@@ -91,6 +91,42 @@ jobs:
9191
with:
9292
context: .
9393
file: ./docker/heplify/Dockerfile
94-
push: ${{ github.event_name != 'pull_request' }}
94+
push: true
95+
tags: ${{ steps.meta.outputs.tags }}
96+
labels: ${{ steps.meta.outputs.labels }}
97+
98+
docker-dockerhub-push:
99+
if: ${{ github.event_name != 'workflow_dispatch' }}
100+
runs-on: ubuntu-latest
101+
needs: build
102+
permissions:
103+
packages: write
104+
contents: read
105+
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Login to DockerHub
109+
if: ${{ steps.checkdocker.outputs.secretspresent }}
110+
uses: docker/[email protected]
111+
with:
112+
username: ${{ secrets.DOCKERHUB_USERNAME }}
113+
password: ${{ secrets.DOCKERHUB_TOKEN }}
114+
115+
- name: Docker meta
116+
id: meta
117+
uses: docker/[email protected]
118+
with:
119+
images: |
120+
qxip/heplify
121+
tags: |
122+
latest
123+
${{ github.ref_name }}
124+
125+
- name: Build and push
126+
uses: docker/[email protected]
127+
with:
128+
context: .
129+
file: ./docker/heplify/Dockerfile
130+
push: true
95131
tags: ${{ steps.meta.outputs.tags }}
96132
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)