Skip to content

Commit f36a061

Browse files
committed
Add workflow to build and push image
1 parent c85d4d9 commit f36a061

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and push container image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-push:
10+
name: Build and push
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/[email protected]
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to Quay.io
23+
uses: docker/login-action@v3
24+
with:
25+
registry: quay.io
26+
username: ${{ secrets.QUAY_USER }}
27+
password: ${{ secrets.QUAY_TOKEN }}
28+
29+
- name: Build and push
30+
uses: docker/build-push-action@v6
31+
with:
32+
context: .
33+
file: Containerfile
34+
platforms: linux/arm64,linux/amd64
35+
provenance: false
36+
push: ${{ github.event_name != 'pull_request' }}
37+
tags: |
38+
quay.io/${{ github.repository }}:latest
39+
quay.io/${{ github.repository }}:${{ github.ref_name }}

0 commit comments

Comments
 (0)