File tree Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Push minimal template docker image to dockerhub
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows :
6
+ - " Run tests"
7
+ branches :
8
+ - master
9
+ types :
10
+ - completed
11
+
12
+ jobs :
13
+ push_image_to_dockerhub :
14
+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+
19
+ - name : Login to DockerHub
20
+ uses : docker/login-action@v1
21
+ with :
22
+ username : ${{ secrets.DOCKER_USER }}
23
+ password : ${{ secrets.DOCKER_PASS }}
24
+
25
+ - name : Build and push image
26
+ uses : docker/build-push-action@v2
27
+ with :
28
+ file : Dockerfile
29
+ context : ./{{cookiecutter.project_name}}/template_minimal
30
+ push : true
31
+ tags : rafsaf/minimal-fastapi-postgres-template:latest
Original file line number Diff line number Diff line change
1
+ name : Manual push minimal template docker image to dockerhub
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ tag :
7
+ description : " Docker image tag"
8
+ required : true
9
+ default : " stable"
10
+
11
+ jobs :
12
+ manual_push_image_to_dockerhub :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+
17
+ - name : Login to DockerHub
18
+ uses : docker/login-action@v1
19
+ with :
20
+ username : ${{ secrets.DOCKER_USER }}
21
+ password : ${{ secrets.DOCKER_PASS }}
22
+
23
+ - name : Build and push image
24
+ uses : docker/build-push-action@v2
25
+ with :
26
+ file : Dockerfile
27
+ context : ./{{cookiecutter.project_name}}/template_minimal
28
+ push : true
29
+ tags : rafsaf/minimal-fastapi-postgres-template:${{ github.event.inputs.tag }}
Original file line number Diff line number Diff line change 1
- name : tests
1
+ name : Run tests
2
2
3
3
on :
4
4
push :
You can’t perform that action at this time.
0 commit comments