Skip to content

Commit c0a9e09

Browse files
mayurwaghmodeAllda
authored andcommitted
Add files via upload
1 parent 42979ad commit c0a9e09

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/main-image.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Push Image
2+
on: # yamllint disable-line rule:truthy
3+
- push
4+
- pull_request
5+
6+
jobs:
7+
test-lint:
8+
name: Run unit tests and linters
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: fedora-python/[email protected]
13+
with:
14+
tox_env: black,test
15+
dnf_install: krb5-devel krb5-workstation
16+
17+
build:
18+
name: Build and push image
19+
runs-on: ubuntu-20.04
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Build Image
25+
id: build-image
26+
uses: redhat-actions/buildah-build@v2
27+
with:
28+
image: operator-pipelines-images
29+
tags: latest ${{ github.sha }}
30+
dockerfiles: |
31+
./operator-pipeline-images/Dockerfile
32+
33+
- name: Push To quay.io
34+
id: push-to-quay
35+
uses: redhat-actions/push-to-registry@v2
36+
with:
37+
image: ${{ steps.build-image.outputs.image }}
38+
tags: ${{ steps.build-image.outputs.tags }}
39+
registry: quay.io/redhat-isv
40+
username: ${{ secrets.REGISTRY_USERNAME }}
41+
password: ${{ secrets.REGISTRY_PASSWORD }}
42+
if: ${{ github.event_name == 'push' }}
43+
44+
- name: Print image url
45+
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
46+
if: ${{ github.event_name == 'push' }}

0 commit comments

Comments
 (0)