-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.19 KB
/
main.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
name: Build and Push Image
on: [ push, pull_request ]
jobs:
test-lint:
name: Run unit tests and linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fedora-python/[email protected]
with:
tox_env: black,test
dnf_install: krb5-devel krb5-workstation
build:
name: Build and push image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: operator-pipelines-images
tags: latest ${{ github.sha }}
dockerfiles: |
./Dockerfile
- 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/redhat-isv
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
if: ${{ github.event_name == 'push' }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
if: ${{ github.event_name == 'push' }}