Skip to content

Commit

Permalink
Build and push tagged images to quay
Browse files Browse the repository at this point in the history
  • Loading branch information
macpie committed Feb 17, 2024
1 parent 5a47af8 commit 54fafc3
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
pull_request:
push:
branches: [main]
tags: ["v*"]

name: docker

jobs:
docker_buildx:
runs-on: ubuntu-22.04
steps:
- name: Setup | Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Setup | Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup | Docker
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Setup | Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_MINER_USER }}
password: ${{ secrets.QUAY_MINER_UPLOAD_TOKEN }}

- name: Setup | Image Tag
if: github.event_name != 'pull_request'
run: echo "image_tag=$(git describe)" >> $GITHUB_ENV

# We publish all builds to the test-images repo.
- name: Build | Test Image
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
labels: VERSION=${{ env.image_tag }}
tags: quay.io/team-helium/test-images:virtual-lorawan-device-${{ env.image_tag }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 54fafc3

Please sign in to comment.