File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 7
7
tags :
8
8
- v*
9
9
10
+ env :
11
+ MIX_ENV : dev
12
+
10
13
jobs :
11
14
dockerhub :
12
15
name : " Publish to Dockehub"
13
16
runs-on : ubuntu-latest
17
+ # Don't run on forks
18
+ if : github.repository == 'aeternity/ae_mdw'
14
19
15
20
steps :
16
21
- uses : actions/checkout@v3
17
22
with :
18
23
fetch-depth : 100
19
24
25
+ - name : Sets MIX_ENV to prod for release
26
+ if : startsWith(github.ref, 'refs/tags/v')
27
+ run : |
28
+ echo "MIX_ENV=prod" >> $GITHUB_ENV
29
+
20
30
- name : Extract metadata for docker
21
31
id : meta
22
32
uses : docker/metadata-action@v4
26
36
type=raw,value=master,enable={{is_default_branch}}
27
37
type=sha,prefix=,enable={{is_default_branch}}
28
38
type=semver,pattern={{version}},enable={{is_default_branch}}
29
-
39
+
30
40
- name : Login to Dockerhub
31
41
uses : docker/login-action@v2
32
42
with :
38
48
if : ${{ steps.meta.outputs.tags }}
39
49
with :
40
50
context : .
41
- build-args : MIX_ENV=prod
51
+ build-args : MIX_ENV=${{env.MIX_ENV}}
42
52
push : true
43
53
tags : ${{ steps.meta.outputs.tags }}
44
54
labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments