File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : CI to Docker Hub with cache
4
+
5
+ # Controls when the workflow will run
6
+ on :
7
+ # Triggers the workflow on push or pull request events but only for the master branch
8
+ push :
9
+ branches :
10
+ - ' main'
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch :
13
+ jobs :
14
+
15
+ build :
16
+ runs-on : ubuntu-latest
17
+ if : " startsWith(github.event.head_commit.message, 'v')"
18
+ steps :
19
+ - name : Check Out Repo
20
+ uses : actions/checkout@v2
21
+
22
+ - name : Login to Docker Hub
23
+ uses : docker/login-action@v1
24
+ with :
25
+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
26
+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
27
+
28
+ - name : Set up Docker Buildx
29
+ id : buildx
30
+ uses : docker/setup-buildx-action@v1
31
+
32
+ - name : Build and push
33
+ id : docker_build
34
+ uses : docker/build-push-action@v2
35
+ with :
36
+ context : ./
37
+ file : ./Dockerfile
38
+ push : true
39
+ tags : ${{ secrets.DOCKER_HUB_USERNAME }}/decisions-compartides:${{ github.event.head_commit.message }}
40
+
41
+ - name : Image digest
42
+ run : echo ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments