Skip to content

Commit

Permalink
Set buildkit env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
isarkis committed Sep 3, 2024
1 parent 9ef9010 commit e95c0df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,25 @@ 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 }}
username: ${{ github.actor }}
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)
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e95c0df

Please sign in to comment.