From e95c0dfc8250c5a63cacd9ca677cbf14f663c6d8 Mon Sep 17 00:00:00 2001 From: Igor Sarkisov Date: Tue, 3 Sep 2024 13:42:14 -0700 Subject: [PATCH] Set buildkit env vars --- .github/workflows/main.yaml | 8 ++++---- docker-compose.yml | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index af3238c71a743d..f5e27e2f97ae28 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -110,7 +110,7 @@ jobs: echo "FLOATING_TAG=${tag}" >> $GITHUB_ENV # Handle GitHub registry used for everything other than pull requests off forked repos. - name: Login to GitHub Docker Registry ${{env.GITHUB_REGISTRY}} - if: ${{ (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository) }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0 with: registry: ${{ env.GITHUB_REGISTRY }} @@ -118,17 +118,17 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set Docker Tag id: set-docker-tag-github - if: ${{ (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository) }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} run: | echo "DOCKER_TAG=${GITHUB_REGISTRY}/${{ github.repository }}/${DOCKER_SERVICE}:${FULL_GIT_SHA::7}" >> $GITHUB_ENV echo "DOCKER_FLOATING_TAG=${GITHUB_REGISTRY}/${{ github.repository }}/${DOCKER_SERVICE}:${FLOATING_TAG}" >> $GITHUB_ENV shell: bash # Handle Google Artifact Registry used for pull requests off forked repos. - name: Set up Cloud SDK - if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.fork) }} + if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository) }} uses: isarkis/setup-gcloud@40dce7857b354839efac498d3632050f568090b6 # v1.1.1 - name: Login to GAR and set tag - if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.fork) }} + if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository) }} run: | # Need to login to GAR to be able to push images created by fork based PR workflows. PROJECT_NAME=$(gcloud config get-value project) diff --git a/docker-compose.yml b/docker-compose.yml index 41691862d41dee..cedfe6572ae918 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,6 @@ services: context: chrobalt/docker/linux cache_from: - ghcr.io/youtube/chrobalt_sandbox/linux:latest - - type=gha - cache_to: - - type=gha image: ghcr.io/youtube/chrobalt_sandbox/linux:latest platform: linux/amd64 environment: