File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Image CI
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+ tags : [ "v*.*.*" ]
9+ pull_request :
10+ branches : [ master ]
11+ release :
12+ types : ["created"]
13+ # Allows you to run this workflow manually from the Actions tab
14+ workflow_dispatch :
15+ inputs : {}
16+
17+ # A workflow run is made up of one or more jobs that can run sequentially or in parallelname: ci
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-22.04
22+ steps :
23+ - uses : actions/checkout@v3
24+ with :
25+ # Need tags for Makefile logic to work
26+ fetch-depth : 0
27+ - name : Build the Docker images
28+ run : make image
29+ deploy :
30+ needs : [ "build" ]
31+ runs-on : ubuntu-22.04
32+ if : github.event_name == 'release' && github.event.action == 'created'
33+ steps :
34+ - name : Login to Docker Hub
35+ uses : docker/login-action@v2
36+ with :
37+ username : ${{ secrets.DOCKERHUB_USERNAME }}
38+ password : ${{ secrets.DOCKERHUB_TOKEN }}
39+ - uses : actions/checkout@v2
40+ with :
41+ # Need tags for Makefile logic to work
42+ fetch-depth : 0
43+ - name : Build and Push Docker Images
44+ run : make push
You can’t perform that action at this time.
0 commit comments