From 0a654d269c3ac1172bbdd64d480bab43f6da26b9 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Thu, 24 Aug 2023 15:42:51 +0200 Subject: [PATCH] Rollback and remove ghcr.io build in forks This seems like a good feature but I don't have time to implement it correctly. --- .github/workflows/bb_containers.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/bb_containers.yml b/.github/workflows/bb_containers.yml index de578c9e..7c9bdab6 100644 --- a/.github/workflows/bb_containers.yml +++ b/.github/workflows/bb_containers.yml @@ -242,9 +242,7 @@ jobs: docker run -u root -i "$image" bash -c "touch /tmp/foo && qpress -r /tmp /root/qpress.qp" done - name: Check for registry credentials - if: > - github.ref == 'refs/heads/main' && - github.repository == 'MariaDB/buildbot' + if: ${{ env.DEPLOY_IMAGES == 'true' }} run: | missing=() [[ -n "${{ secrets.QUAY_USER }}" ]] || missing+=(QUAY_USER) @@ -258,20 +256,13 @@ jobs: echo "Not pushing images to registry" fi - name: Login to ghcr.io + if: ${{ env.DEPLOY_IMAGES == 'true' }} uses: docker/login-action@v2 - # this should make it possible to build images in main forks. - if: > - (!contains(matrix.dockerfile, 'rhel')) && - github.head_ref == 'main' with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push images to ghcr.io - # this should make it possible to build images in main forks. - if: > - (!contains(matrix.dockerfile, 'rhel')) && - github.head_ref == 'main' run: | msg="Push docker image to ghcr.io (${{ env.IMG }})" line="${msg//?/=}"