@@ -3,18 +3,19 @@ name: Test and Build image
33on :
44 push :
55 tags :
6- - ' [0-9]+.[0-9]+.[0-9]+'
7- - ' [0-9]+.[0-9]+.[0-9]+-rc\.[0-9]+'
6+ - " [0-9]+.[0-9]+.[0-9]+"
7+ - ' [0-9]+.[0-9]+.[0-9]+-rc\.[0-9]+'
88 branches :
9- - ' * '
9+ - " * "
1010
1111jobs :
1212 test :
1313 name : Test
1414 runs-on : ubuntu-latest
1515
1616 container :
17- image : elixir:1.18-alpine
17+ # Pinned to just before an error, TODO: upgrade
18+ image : elixir:1.18.3-alpine
1819
1920 services :
2021 postgres :
@@ -32,28 +33,27 @@ jobs:
3233 --health-retries 5
3334
3435 steps :
36+ - name : Install APK packages
37+ run : |
38+ apk update
39+ apk add --virtual build-dependencies build-base
40+ apk add bash nodejs npm inotify-tools openssl
3541
36- - name : Install APK packages
37- run : |
38- apk update
39- apk add --virtual build-dependencies build-base
40- apk add bash nodejs npm inotify-tools openssl
41-
42- - uses : actions/checkout@v1
42+ - uses : actions/checkout@v1
4343
44- - name : Install Dependencies
45- run : |
46- mix local.hex --force
47- mix local.rebar --force
48- mix deps.get
44+ - name : Install Dependencies
45+ run : |
46+ mix local.hex --force
47+ mix local.rebar --force
48+ mix deps.get
4949
50- - name : Run Tests
51- run : mix test
52- env :
53- # use postgres for the host here because we have specified a container for the job.
54- # If we were running the job on the VM this would be localhost
55- POSTGRES_HOST : postgres
56- POSTGRES_PORT : ${{ job.services.postgres.ports[5432] }}
50+ - name : Run Tests
51+ run : mix test
52+ env :
53+ # use postgres for the host here because we have specified a container for the job.
54+ # If we were running the job on the VM this would be localhost
55+ POSTGRES_HOST : postgres
56+ POSTGRES_PORT : ${{ job.services.postgres.ports[5432] }}
5757
5858 check_tag :
5959 name : Check tag
@@ -91,21 +91,20 @@ jobs:
9191 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9292
9393 steps :
94+ - uses : actions/checkout@v1
9495
95- - uses : actions/checkout@v1
96-
97- - name : Publish to Registry
98- uses : elgohr/Publish-Docker-Github-Action@master
99- env :
100- APP_REVISION : ${{ github.ref_name }}
101- with :
102- name : errkk/playrequest/pr
103- username : _
104- password : ${{ secrets.GITHUB_TOKEN }}
105- registry : ghcr.io
106- dockerfile : Dockerfile
107- buildargs : APP_REVISION
108- tags : ${{ needs.check_tag.outputs.tags }}
96+ - name : Publish to Registry
97+ uses : elgohr/Publish-Docker-Github-Action@master
98+ env :
99+ APP_REVISION : ${{ github.ref_name }}
100+ with :
101+ name : errkk/playrequest/pr
102+ username : _
103+ password : ${{ secrets.GITHUB_TOKEN }}
104+ registry : ghcr.io
105+ dockerfile : Dockerfile
106+ buildargs : APP_REVISION
107+ tags : ${{ needs.check_tag.outputs.tags }}
109108
110109 deploy_prod :
111110 name : Deploy production
0 commit comments