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+ # This build will only build the image on any branch (besides main) where there is a push
2+ name : Build Docker Image
3+
4+ on :
5+ push :
6+ branches :
7+ - ' *'
8+ - ' !main'
9+
10+ jobs :
11+ build-image :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v2
16+
17+ - name : Login to DockerHub
18+ uses : docker/login-action@v1
19+ with :
20+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
21+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
22+
23+ - name : Build Image
24+ id : docker_build
25+ uses : docker/build-push-action@v2
26+ with :
27+ context : ./
28+ file : ./Dockerfile
29+ push : false
30+ tags : earthlab/r-python-eds-lessons-env:latest
31+
32+ - name : Image digest
33+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ # This build will build and push the image to docker hub upon a commit to the
2+ # main branch only
3+ name : Push to Docker Hub from Main Branch
4+
5+ on :
6+ push :
7+ branches : main
8+
9+ jobs :
10+ build-push-image :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+
16+ - name : Login to DockerHub
17+ uses : docker/login-action@v1
18+ with :
19+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
20+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
21+
22+ - name : Build and push image
23+ id : docker_build
24+ uses : docker/build-push-action@v2
25+ with :
26+ context : ./
27+ file : ./Dockerfile
28+ push : true
29+ tags : earthlab/r-python-eds-lessons-env:latest
30+
31+ - name : Image digest
32+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 22.DS_Store
33.nbgrader.log
443.6
5+ .ipynb_checkpoints /
You can’t perform that action at this time.
0 commit comments