-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.23 KB
/
publish.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
name: Publish Assets
on:
push:
branches: [master]
tags:
- "v*"
jobs:
build:
uses: ./.github/workflows/test.yaml
secrets: inherit
push-image:
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Login to Quay
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Retrieve Image
uses: actions/download-artifact@v2
with:
name: rds-scheduler-image
path: /tmp
- name: Load Image
run: |
docker load -i /tmp/rds-scheduler-image.tar
- name: Get image tag
id: get_image_tag
run: |
if [[ "${GITHUB_REF##*/}" == "master" ]]; then
echo "::set-output name=image_tag::latest"
else
echo "::set-output name=image_tag::${GITHUB_REF##*/}"
fi
- name: Push image
run: |
docker tag quay.io/appvia/rds-scheduler:ci quay.io/appvia/rds-scheduler:${{ steps.get_image_tag.outputs.image_tag }}
docker push quay.io/appvia/rds-scheduler:${{ steps.get_image_tag.outputs.image_tag }}