Skip to content

Commit 8a7c31d

Browse files
committed
Add image build and push action
1 parent 351fe16 commit 8a7c31d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
tags:
8+
- "v*"
9+
pull_request:
10+
branches:
11+
- "master"
12+
13+
env:
14+
REGISTRY: quay.io
15+
IMAGE_NAME: ${{ github.repository }}
16+
17+
jobs:
18+
docker:
19+
runs-on: ubuntu-latest
20+
if: github.actor != 'dependabot[bot]'
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+
- name: Login to Quay.io Container Registry
34+
uses: docker/login-action@v3
35+
with:
36+
registry: quay.io
37+
username: utilitywarehouse+drone_ci
38+
password: ${{ secrets.SYSTEM_QUAY_TOKEN }}
39+
- name: Build and push Docker image
40+
uses: docker/build-push-action@v6
41+
with:
42+
context: .
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)