From 9cf42f9fa2e98cdb663d9bfb44fa94a834192ffe Mon Sep 17 00:00:00 2001 From: Paulius J Date: Thu, 18 Jan 2024 12:40:45 +0100 Subject: [PATCH] test package build --- .github/workflows/go.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fde29df..da37e2e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -51,7 +51,10 @@ jobs: name: Build and push image runs-on: ubuntu-latest needs: [lint, test] - if: startsWith(github.event.ref, 'refs/tags/v') + if: startsWith(github.event.ref, 'refs/heads/docker') + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} steps: - name: Check out the repo @@ -60,7 +63,7 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -68,7 +71,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: teamwork/kommentaar + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@v5