This repository was archived by the owner on Feb 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : DOCKER-HUB
2+
3+ # Controls when the workflow will run
4+ on :
5+ # Triggers the workflow on push or pull request events but only for the master branch
6+ push :
7+ branches : [ master ]
8+ release :
9+ types : [ published ]
10+
11+ # Allows you to run this workflow manually from the Actions tab
12+ workflow_dispatch :
13+
14+ jobs :
15+ push :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Check out code
19+ uses : actions/checkout@v2
20+ - name : Set up node
21+ uses : actions/setup-node@v2
22+ with :
23+ node-version : ' 12.16'
24+ - name : Install dependencies
25+ run : yarn install:all
26+ - name : Run tests
27+ run : yarn test:all
28+ - name : Build
29+ run : yarn build:all
30+ - name : Login to Docker Hub
31+ uses : docker/login-action@v1
32+ with :
33+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
34+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
35+ - name : Push Latest
36+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
37+ run : |
38+ docker push scale8/router:latest && docker push scale8/api:latest && docker push scale8/edge:latest
39+ - name : Tag for Release
40+ if : github.event_name == 'release'
41+ run : |
42+ docker tag scale8/router:latest scale8/router:${GITHUB_REF##*/} && docker tag scale8/api:latest scale8/api:${GITHUB_REF##*/} && docker tag scale8/edge:latest scale8/edge:${GITHUB_REF##*/}
43+ - name : Push for Release
44+ if : github.event_name == 'release'
45+ run : |
46+ docker push scale8/router:${GITHUB_REF##*/} && docker push scale8/api:${GITHUB_REF##*/} && docker push scale8/edge:${GITHUB_REF##*/}
Original file line number Diff line number Diff line change @@ -2,28 +2,26 @@ name: CI
22
33# Controls when the workflow will run
44on :
5- # Triggers the workflow on push or pull request events but only for the master branch
6- push :
7- branches : [ master ]
8- pull_request :
9- branches : [ master ]
5+ # Triggers the workflow on push or pull request events but only for the master branch
6+ pull_request :
7+ branches : [ master ]
108
11- # Allows you to run this workflow manually from the Actions tab
12- workflow_dispatch :
9+ # Allows you to run this workflow manually from the Actions tab
10+ workflow_dispatch :
1311
1412jobs :
15- build-and-test :
16- runs-on : ubuntu-latest
17- steps :
18- - name : Check out code
19- uses : actions/checkout@v2
20- - name : Set up node
21- uses : actions/setup-node@v2
22- with :
23- node-version : ' 12.16'
24- - name : Install dependencies
25- run : yarn install:all
26- - name : Run tests
27- run : yarn test:all
28- - name : Build
29- run : yarn build:all
13+ build-and-test :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Check out code
17+ uses : actions/checkout@v2
18+ - name : Set up node
19+ uses : actions/setup-node@v2
20+ with :
21+ node-version : ' 12.16'
22+ - name : Install dependencies
23+ run : yarn install:all
24+ - name : Run tests
25+ run : yarn test:all
26+ - name : Build
27+ run : yarn build:all
You can’t perform that action at this time.
0 commit comments