diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 08df8f6..b85c056 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -2,7 +2,9 @@ name: Build and Publish on: pull_request: + types: ["opened", "synchronize"] release: + types: ["published"] jobs: build-binary: @@ -51,6 +53,7 @@ jobs: name: Publish binaries to release if: github.event_name == 'release' runs-on: ubuntu-latest + needs: build-binary steps: - uses: actions/download-artifact@v3 with: @@ -90,10 +93,17 @@ jobs: type=semver,pattern={{version}} type=sha + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Build and push + - name: Build image uses: docker/build-push-action@v3 with: context: .