name: Build and Publish Docker Packages on: release: types: - published env: REGISTRY: git.tjdev.de IMAGE_NAME: ${{ gitea.repository }} jobs: build-and-publish-docker-packages: runs-on: ubuntu-latest steps: - name: Checkout repository uses: https://github.com/actions/checkout@v4 - name: Login to Git Container Registry uses: https://github.com/docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ secrets.GIT_PACKREG_USERNAME }} password: ${{ secrets.GIT_PACKREG_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta uses: https://github.com/docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - name: Build and push Docker image uses: https://github.com/docker/build-push-action@v5 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}