-
Notifications
You must be signed in to change notification settings - Fork 639
58 lines (58 loc) · 1.67 KB
/
docker-publish.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
49
50
51
52
53
54
55
56
57
58
name: Docker Publish
on:
push:
branches: [master]
paths-ignore:
- 'README.md'
- 'SECURITY.md'
- 'TERMS.md'
- 'privacy.md'
- 'CONTRIBUTING.md'
jobs:
publish:
if: github.repository == 'disease-sh/API'
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- uses: zcong1993/setup-timezone@master
with:
timezone: America/Denver
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H-%M')"
- name: Publish calver tag to Registry
uses: docker/build-push-action@v1
with:
context: .
username: ebwinters
password: ${{ secrets.Docker_Token }}
repository: novelcovid/novelcovid-api
tags: ${{ steps.date.outputs.date }}
- name: Publish latest to Registry
uses: docker/build-push-action@v1
with:
username: ebwinters
password: ${{ secrets.Docker_Token }}
repository: novelcovid/novelcovid-api
tags: latest
- name: Publish hashed tag to Registry
uses: docker/build-push-action@v1
with:
username: ebwinters
password: ${{ secrets.Docker_Token }}
repository: novelcovid/novelcovid-api
tag_with_sha: true
merge-branch:
if: github.repository == 'disease-sh/API'
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge by labeled
uses: devmasx/[email protected]
with:
type: now
target_branch: 'prod'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}