Skip to content

Commit

Permalink
Merge pull request #34 from jansule/publish-to-github
Browse files Browse the repository at this point in the history
ci: publish docker image to github registry
  • Loading branch information
jansule authored Feb 14, 2025
2 parents d134ab8 + 37c57b0 commit 77afd8c
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Nexus
uses: docker/login-action@v1
- name: Log in to the Container registry
uses: docker/login-action@3b8fed7e4b60203b2aa0ecc6c6d6d91d12c06760
with:
registry: nexus.terrestris.de
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: build and push
id: docker_build
uses: docker/build-push-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
push: true
context: .
tags: |
nexus.terrestris.de/geostyler/geostyler-homepage:latest
nexus.terrestris.de/geostyler/geostyler-homepage:${{ github.ref_name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 77afd8c

Please sign in to comment.