File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ tags :
4+ - ' .*'
5+ workflow_run :
6+ workflows : ["Test code"]
7+ branches : [master, develop]
8+ types :
9+ - completed
10+
11+ name : Docker Build
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Check Out Repo
18+ uses : actions/checkout@v2
19+
20+ - name : Login to Docker Hub
21+ uses : docker/login-action@v1
22+ with :
23+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
24+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
25+
26+ - name : Set up Docker Buildx
27+ id : buildx
28+ uses : docker/setup-buildx-action@v1
29+
30+ - name : Extract tag name
31+ id : extract_tag_name
32+ shell : bash
33+ run : echo "##[set-output name=tag;]$(echo ${GITHUB_REF##*/})"
34+
35+ - name : Build and push
36+ id : docker_build
37+ uses : docker/build-push-action@v2
38+ with :
39+ context : ./
40+ file : ./Dockerfile
41+ push : true
42+ tags : napalmautomation/napalm-logs:${{ steps.extract_tag_name.outputs.tag }}
43+
44+ - name : Image digest
45+ run : echo ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments