-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.79 KB
/
ens_update_env_container.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build and Push ensembl-update-env container
on:
push:
paths:
- "ensembl-update/Dockerfile"
- "ensembl-update/tag"
- ".github/workflows/ens_update_env_container.yaml"
jobs:
test:
name: Build image
runs-on: ubuntu-latest
env:
IMAGE_NAME: ensembl-update-env
if: startsWith( github.ref, 'refs/heads/feature/' )
steps:
- uses: actions/checkout@v2
- name: Read tag
id: gettag
run: echo "::set-output name=tag::$(head -n 1 ensembl-update/tag )"
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ steps.gettag.outputs.tag }}
dockerfiles: |
./ensembl-update/Dockerfile
deploy:
name: Build and deploy image to quay.io/ebigxa
runs-on: ubuntu-latest
env:
IMAGE_NAME: ensembl-update-env
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Read tag
id: gettag
run: echo "::set-output name=tag::$(head -n 1 ensembl-update/tag )"
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ steps.gettag.outputs.tag }}
dockerfiles: |
./ensembl-update/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 }}"