Skip to content

Commit

Permalink
Add GHA build + Quay push steps
Browse files Browse the repository at this point in the history
  • Loading branch information
george-angel committed Feb 24, 2023
1 parent 9f1742d commit c1d05d9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
push:
branches:
- "master"
tags:
- "v*"
pull_request:
branches:
- "master"

permissions:
contents: write

env:
REGISTRY: quay.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Login to Quay.io Container Registry
if: github.actor != 'dependabot[bot]'
uses: docker/login-action@v2
with:
registry: quay.io
username: utilitywarehouse+drone_ci
password: ${{ secrets.SYSTEM_QUAY_TOKEN }}
- name: Build and push Docker image
if: github.actor != 'dependabot[bot]'
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit c1d05d9

Please sign in to comment.