-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (51 loc) · 1.4 KB
/
build-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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
name: build-push
on:
workflow_call:
inputs:
tag:
description: 'Tag'
default: 'github-latest'
required: true
type: string
image:
description: Image
type: string
default: api
labels:
description: 'quay labels'
default: ''
required: false
type: string
secrets:
registry_username:
description: 'Username to login to Quay.io'
required: true
registry_password:
description: 'password to login to Quay.io'
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
id: build-image
with:
image: sandbox-${{inputs.image}}
tags: ${{inputs.tag}} ${{ github.sha }}
labels: ${{ inputs.labels }}
containerfiles: |-
Containerfile.${{inputs.image}}
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/rhpds
username: ${{ secrets.registry_username }}
password: ${{ secrets.registry_password }}