-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 949 Bytes
/
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
name: Release
on:
push:
tags:
- v*.*.*
jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Run tests
run: docker-compose run test
publish-docker-image:
needs: test
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set version
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:11} # converts "refs/tags/v0.0.0" => "0.0.0"
- name: Print version
run: echo ${RELEASE_VERSION}
- name: Docker build
run: docker build -t app .
- name: Docker push release
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker tag app r2k1/sql-alert-manager:${RELEASE_VERSION}
docker push r2k1/sql-alert-manager:${RELEASE_VERSION}
docker tag app r2k1/sql-alert-manager:latest
docker push r2k1/sql-alert-manager:latest