-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.08 KB
/
build-and-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: build and push
on:
push:
branches:
- main
paths-ignore:
- "deployment/**"
- ".github/worflows/**"
- "src/main/docker/Dockerfile"
- "src/test/**"
- "README.md"
- ".gitignore"
- ".dockerignore"
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build-and-push-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build Image with Buildah
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: api-endpoint
tags: latest ${{ github.sha }}
containerfiles: |
./src/main/docker/Dockerfile.native-distroless
context: .
- name: Push to quay.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/jaeichle
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}