-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (27 loc) · 903 Bytes
/
push.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
name: On push
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker-compose pull
- uses: satackey/[email protected]
continue-on-error: true
- run: docker-compose -f docker-compose.test.yml build
- run: docker-compose -f docker-compose.test.yml run web sh -c 'rails db:setup && rails test'
deploy_production:
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: satackey/[email protected]
continue-on-error: true
- uses: zenato/docker-action@master
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
repository: ${{ secrets.REGISTRY_REPO }}
registry: ${{ secrets.REGISTRY_URL }}
tag: latest