-
Notifications
You must be signed in to change notification settings - Fork 19
41 lines (38 loc) · 1.03 KB
/
ci.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
---
name: Continuous integration
on:
push:
jobs:
main:
name: Continuous integration
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
TX_TOKEN: ${{ secrets.TX_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Build
run: make build
- name: Lint
run: make check
- name: Tests
run: make test
- name: Publish to Docker hub
if: >
github.repository == 'GFDRR/thinkhazard'
&& success()
&& (
startsWith(github.ref, 'refs/tags/')
|| github.ref == 'refs/heads/master'
)
run: |
docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD}
make docker-push
- name: Push to transifex
if: >
github.repository == 'GFDRR/thinkhazard'
&& success()
&& github.ref == 'refs/heads/master'
run: make transifex-push-ui