-
-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (49 loc) · 1.51 KB
/
deploy.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
name: 'Image Building'
on:
push:
branches:
- master
- develop
jobs:
build_image:
runs-on: ubuntu-latest
name: Workflow
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get branch name
id: branch_name
run: echo ::set-output name=branch::$(echo ${GITHUB_REF##*/})
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push image
uses: docker/build-push-action@v2
with:
push: true
tags: aquemy1/echr_build:${{ steps.branch_name.outputs.branch }}
- name: Run linter
uses: ./.github/actions/container_run
with:
cont_action: 'lint'
- name: Run unit tests
uses: ./.github/actions/container_run
with:
cont_action: 'test'
- name: Get coverage
run: echo COV=`cat cov_html/index.html | grep class=\"pc_cov\" | grep -oEi '[0-9]+%'` >> $GITHUB_ENV
- name: Coverage badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 0a01112a76f73945a9f27710cf9c7a25
filename: coverage.json
label: Coverage
message: ${{ env.COV }}
color: green