Skip to content

Commit c18ebde

Browse files
committed
feat(ci): add Docker publish workflow
Adds a GitHub Actions workflow to build and push a multi-architecture Docker image to Docker Hub. Key features: - Triggers on push to the 'develop' branch or manual dispatch. - Builds a multi-arch image for linux/amd64, linux/arm64, and linux/arm/v7. - Caches Docker layers and frontend build artifacts to accelerate builds. - Uses DOCKERHUB_USERNAME secret for the image repository. - The workflow is skipped if required Docker Hub secrets are not defined.
1 parent 5f15353 commit c18ebde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
build:
10+
if: secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != ''
1011
runs-on: ubuntu-latest
1112
steps:
1213
-
@@ -47,6 +48,6 @@ jobs:
4748
file: ./docker/Dockerfile
4849
platforms: linux/amd64,linux/arm64,linux/arm/v7
4950
push: true
50-
tags: zuptalo/nginx-proxy-manager:develop
51+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/nginx-proxy-manager:develop
5152
cache-from: type=gha
5253
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)