File tree Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Original file line number Diff line number Diff line change 6
6
branches :
7
7
- master
8
8
9
- # Publish `v1.2.3` tags as releases.
10
- tags :
11
- - v*
12
-
13
- # Run tests for any PRs.
14
- pull_request :
15
-
16
9
env :
17
10
# TODO: Change variable to your image's name.
18
11
IMAGE_NAME : node-jasmine
19
12
VERSION : latest
20
13
21
14
jobs :
22
- # Run tests.
23
- # See also https://docs.docker.com/docker-hub/builds/automated-testing/
24
- test :
25
- runs-on : ubuntu-latest
26
-
27
- steps :
28
- - uses : actions/checkout@v2
29
-
30
- - name : Run tests
31
- run : |
32
- if [ -f docker-compose.test.yml ]; then
33
- docker-compose --file docker-compose.test.yml build
34
- docker-compose --file docker-compose.test.yml run sut
35
- else
36
- docker build . --file Dockerfile
37
- fi
38
-
39
15
# Push image to GitHub Packages.
40
16
# See also https://docs.docker.com/docker-hub/builds/
41
17
push :
42
- # Ensure test job passes before pushing image.
43
- needs : test
44
-
45
18
runs-on : ubuntu-latest
46
19
if : github.event_name == 'push'
47
-
48
20
steps :
49
21
- uses : actions/checkout@v2
50
22
62
34
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
63
35
64
36
echo IMAGE_ID=$IMAGE_ID
65
- echo VERSION=$VERSION
66
37
67
- docker tag image $IMAGE_ID:$VERSION
68
- docker push $IMAGE_ID:$VERSION
38
+ docker tag image $IMAGE_ID
39
+ docker push $IMAGE_ID
You can’t perform that action at this time.
0 commit comments