diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d8d636f..d431177 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,6 +60,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Google Artifact Registry + uses: docker/login-action@v2 + with: + registry: us-docker.pkg.dev + username: _json_key + password: ${{ secrets.ARTIFACT_BUILDER_JSON_KEY }} + - name: Login to GitHub Container Registry uses: docker/login-action@v2 if: ${{ github.event_name == 'pull_request' }} || ${{ github.event_name == 'release' }} @@ -77,6 +84,15 @@ jobs: push: ${{ github.event_name == 'pull_request' }} tags: ghcr.io/castai/audit-logs-receiver:${{ github.sha }} + - name: Build and push main + if: github.event_name != 'release' + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/arm64,linux/amd64 + push: ${{ github.event_name != 'pull_request' }} + tags: us-docker.pkg.dev/castai-hub/library/audit-logs-receiver:${{ github.sha }} + - name: Build and push release if: github.event_name == 'release' uses: docker/build-push-action@v4 @@ -85,5 +101,5 @@ jobs: push: true platforms: linux/arm64,linux/amd64 tags: | - ghcr.io/castai/audit-logs-receiver:${{ env.RELEASE_TAG }} - ghcr.io/castai/audit-logs-receiver:latest + us-docker.pkg.dev/castai-hub/library/audit-logs-receiver:${{ env.RELEASE_TAG }} + us-docker.pkg.dev/castai-hub/library/audit-logs-receiver:latest \ No newline at end of file