Skip to content

🐞 fix (AUTH): wrong URL in prod, rely on reverse proxy headers! #16

🐞 fix (AUTH): wrong URL in prod, rely on reverse proxy headers!

🐞 fix (AUTH): wrong URL in prod, rely on reverse proxy headers! #16

name: Build and publish container images
on:
release:
types: [created]
push:
branches:
- main
jobs:
build:
name: Build and publish container images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: deutschemodelunitednations/delegator
flavor: |
latest=false
tags: |
type=semver,pattern={{version}},value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=semver,pattern={{major}},value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=semver,pattern={{major}}.{{minor}},value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=raw,value=prerelease,enable=${{ github.event_name == 'release' && github.event.release.prerelease }}
type=raw,value=nightly,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}