-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (40 loc) · 1.18 KB
/
Copy pathimage-push.yaml
File metadata and controls
44 lines (40 loc) · 1.18 KB
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
43
44
name: Image Push
on:
release:
types: [published]
push:
branches: [main]
workflow_dispatch: {}
jobs:
image-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Determine tags
id: tags
run: |
TAGS="$(git rev-parse --short HEAD)"
if [[ "${{ github.event_name }}" == "push" ]]; then
TAGS="latest ${TAGS}"
fi
if [[ "${{ github.event_name }}" == "release" ]]; then
TAGS="stable ${TAGS} ${{ github.event.release.tag_name }}"
fi
echo "tags=${TAGS}" >> "$GITHUB_OUTPUT"
- name: Build Fournos Image
id: build
uses: redhat-actions/buildah-build@v2
with:
image: fournos
context: .
tags: ${{ steps.tags.outputs.tags }}
containerfiles: |
./Containerfile
- name: Push Fournos Image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: quay.io/rh_perfscale
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}