From 8ad3b71ecaf57d94710b424f09c9d06104926bac Mon Sep 17 00:00:00 2001 From: Alexey Karasev Date: Tue, 14 Jan 2025 15:51:47 +0500 Subject: [PATCH] Update GitHub Action configuration --- .github/workflows/push.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 728784d..5d45ec3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -5,6 +5,9 @@ on: push: branches: - '**' + pull_request: + branches: + - '**' env: TAG_NAME: ${{ github.event.release.tag_name || (github.ref == 'refs/heads/main' && 'main' || ( inputs.postfix != '' && format('{0}-{1}', github.ref, inputs.postfix) || 'none' )) }} @@ -31,8 +34,8 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: ${GITHUB_ACTOR} - password: ${{secrets.GITHUB_TOKEN}} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 with: @@ -40,6 +43,7 @@ jobs: context: ${{ matrix.component.context }} file: ${{ matrix.component.file }} platforms: linux/amd64,linux/arm64 - push: true + # See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#fetching-metadata-about-a-pull-request + push: ${{ github.event_name != 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]' }} tags: ghcr.io/netcracker/${{ matrix.component.name }}:${{ env.TAG_NAME }} provenance: false