File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Containerimage
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*.*.*'
7
+ schedule :
8
+ - cron : ' 55 10 * * *'
9
+
10
+ jobs :
11
+ push_to_registry :
12
+ name : Push Containerimage to Docker Hub
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v2
18
+
19
+ - name : Set output
20
+ id : vars
21
+ run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
22
+
23
+ - name : Check output
24
+ env :
25
+ RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
26
+ run : |
27
+ echo $RELEASE_VERSION
28
+ echo ${{ steps.vars.outputs.tag }}
29
+
30
+ - name : Login to Docker Hub
31
+ uses : docker/login-action@v1
32
+ with :
33
+ username : ${{ secrets.DOCKER_USERNAME }}
34
+ password : ${{ secrets.DOCKER_PASSWORD }}
35
+
36
+ - name : build
37
+ run : docker build . --file Containerfile --tag ${{ secrets.DOCKER_ORG }}/${{ secrets.DOCKER_REPO }}:${{ steps.vars.outputs.tag }} --tag ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}:latest
38
+
39
+ - name : push
40
+ run : docker image push --all-tags ${{ secrets.DOCKER_ORG }}/${{ secrets.DOCKER_REPO }}
You can’t perform that action at this time.
0 commit comments