-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.24 KB
/
upload_docker_container.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
name: Build and upload the ae-substracking-interface Docker image
on:
push:
branches:
- main
tags:
- v*.*.*
release:
types:
- published
env:
IMAGE_NAME: submissions-tracking-interface
jobs:
deploy:
name: Build and deploy image to quay.io/ebigxa
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Read tag
id: gettag
run: echo ::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ steps.gettag.outputs.tag }}
dockerfiles: |
./Dockerfile
- name: Push to Quay
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
run: echo "New image has been pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"