From 08d0a6c341c0c26e2e3e00ffdf2b59aa2851e62e Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Sat, 30 Oct 2021 09:40:55 +0200 Subject: [PATCH] updated github actions --- .github/workflows/build-and-publish.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 5cd1c1e..37d7e9e 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -4,6 +4,8 @@ on: push: branches: - 'main' + tags: + - 'v*' pull_request: jobs: @@ -16,8 +18,15 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: ghcr.io/${{ github.repository }} + - name: Login to Github Packages uses: docker/login-action@v1 + if: github.event_name != 'pull_request' with: registry: ghcr.io username: ${{ github.actor }} @@ -27,5 +36,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - push: ${{ github.ref == 'refs/heads/main' }} - tags: ghcr.io/chaoswest-tv/durchsage:latest \ No newline at end of file + context: . + push: ${{ github.event_name != 'pull_request'}} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file