From 7fc51e422baf120a3c4e5ff922e1888305096d65 Mon Sep 17 00:00:00 2001 From: Alexander Minkin Date: Mon, 4 Nov 2024 14:19:28 +0300 Subject: [PATCH] ci(actions): return pushing to registry --- .github/workflows/build.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9ca4fb2f..638ba7cd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,8 +46,9 @@ jobs: type=ref,event=tag type=raw,value=latest,enable={{is_default_branch}} - # - name: Log into registry - # run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Log into registry + if: github.event_name != 'pull_request' + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build base image uses: docker/build-push-action@v6 @@ -56,6 +57,7 @@ jobs: file: install/automated/docker/openvk.Dockerfile tags: ${{ steps.basemeta.outputs.tags }} labels: ${{ steps.basemeta.outputs.labels }} + push: ${{ github.event_name != 'pull_request' }} build-args: | GITREPO=${{ steps.repositorystring.outputs.lowercase }} @@ -115,12 +117,14 @@ jobs: type=ref,event=tag,prefix=${{env.DB_VERSION}}-eventdb- type=raw,value=${{env.DB_VERSION}}-eventdb,enable={{is_default_branch}} - # - name: Log into registry - # run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Log into registry + if: github.event_name != 'pull_request' + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build MariaDB primary image uses: docker/build-push-action@v6 with: + push: ${{ github.event_name != 'pull_request' }} platforms: linux/${{matrix.platform}} file: install/automated/docker/mariadb-primary.Dockerfile tags: ${{ steps.db-primarymeta.outputs.tags }} @@ -131,6 +135,7 @@ jobs: - name: Build MariaDB event image uses: docker/build-push-action@v6 with: + push: ${{ github.event_name != 'pull_request' }} platforms: linux/${{matrix.platform}} file: install/automated/docker/mariadb-eventdb.Dockerfile tags: ${{ steps.db-eventmeta.outputs.tags }}