Skip to content

Commit

Permalink
Merge pull request #76 from influxdata/use-depot
Browse files Browse the repository at this point in the history
feat: Use depot to build multi-arch images quickly
  • Loading branch information
Marko Mikulicic authored Sep 7, 2023
2 parents 4bf1b7e + f586e77 commit 75f9799
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ jobs:
pack:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write
# Allows pushing to the GitHub Container Registry
packages: write

steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
- uses: depot/setup-action@v1
- name: Login to GHCR
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2
with:
Expand All @@ -48,19 +53,21 @@ jobs:
echo "LAST_COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Build
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4
uses: depot/build-push-action@v1
with:
context: .
project: gg0kz3d1l3
platforms: linux/amd64,linux/arm64
push: false
tags: us-docker.pkg.dev/influxdb2-artifacts/tubernetes/sinker:${{ env.LAST_COMMIT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4
if: github.event_name == 'pull_request'

- name: Build & Push
uses: depot/build-push-action@v1
with:
context: .
project: gg0kz3d1l3
platforms: linux/amd64,linux/arm64
push: true
tags: us-docker.pkg.dev/influxdb2-artifacts/tubernetes/sinker:${{ env.LAST_COMMIT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
if: github.event_name != 'pull_request'

0 comments on commit 75f9799

Please sign in to comment.