File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Docker Image CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+
9+ build :
10+ environment : docker-build
11+
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v2
16+
17+ - name : Login to Docker Hub
18+ uses : docker/login-action@v1
19+ with :
20+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
21+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v1
25+
26+ - name : Build and push
27+ uses : docker/build-push-action@v2
28+ with :
29+ context : ./
30+ file : ./Dockerfile
31+ builder : ${{ steps.buildx.outputs.name }}
32+ push : true
33+ tags : ${{ secrets.DOCKER_HUB_USERNAME }}/textfsm101:latest
34+ cache-from : type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/textfsm101:buildcache
35+ cache-to : type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/textfsm101:buildcache,mode=max
You can’t perform that action at this time.
0 commit comments