name: build-push-image on: push: tags: - 'v*' jobs: build-and-push-image: runs-on: ubuntu-latest permissions: packages: write steps: - name: Checkout repository uses: actions/checkout@v3 - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: registry: https://ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 with: push: true tags: ghcr.io/tlinden/kleingebaeck:${{ github.ref_name}} - name: Build and push latest Docker image uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 with: push: true tags: ghcr.io/tlinden/kleingebaeck:latest