-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.76 KB
/
release.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: release app binary on tag
# on tag push, build and push docker images to ghcr.io
# and creating a GitHub release
# and publish the release to GitHub
on:
release:
types: [created]
push:
tags:
# only build on tags that start with 'v'
# having major, minor and path version numbers
# along with alpha beta support
# e.g. v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0
- 'v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+)+.[0-9]?'
- 'v[0-9]+.[0-9]+.[0-9]'
- 'v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+)'
jobs:
build:
uses: ./.github/workflows/rust_build.yml
publish:
runs-on: ubuntu-latest
needs: build
if: needs.build.result == 'success'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.AMN_PAT }}
- name: Build and publish chronos for chronos image with ver
run: |
docker build -f Dockerfile.chronos . --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME --tag ghcr.io/$GITHUB_REPOSITORY:latest
docker push ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
- name: publish chronos latest for chronos image replace latest
run: |
docker push ghcr.io/$GITHUB_REPOSITORY:latest
- name: Build and publish the chronos-pg-migration Docker image
run: |
docker build -f Dockerfile.chronos-pg-migrations . --tag ghcr.io/$GITHUB_REPOSITORY/db-migration:$GITHUB_REF_NAME
docker push ghcr.io/$GITHUB_REPOSITORY/db-migration:$GITHUB_REF_NAME