-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.42 KB
/
irap-fedora-ci-runner.yaml
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
name: Build and Push atlas-irap-env container
on:
push:
branches:
- master
paths:
- "irap-fedora/**"
pull_request:
paths:
- "irap-fedora/**"
jobs:
deploy:
name: Build and deploy image to quay.io/ebigxa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read image name
id: getimagename
run: echo "::set-output name=imagename::$(head -n 1 irap-fedora/tag | awk -F':' '{print $1}')"
- name: Read tag
id: gettag
run: echo "::set-output name=tag::$(head -n 1 irap-fedora/tag | awk -F':' '{print $2}')"
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ steps.getimagename.outputs.imagename }}
tags: ${{ steps.gettag.outputs.tag }}
containerfiles: |
./irap-fedora/Dockerfile
- name: Push to Quay
if: ${{ github.ref == 'refs/heads/master' }}
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/ebigxa
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Use the image
if: ${{ github.ref == 'refs/heads/master' }}
run: echo "New image has been pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"