File tree Expand file tree Collapse file tree 4 files changed +48
-31
lines changed Expand file tree Collapse file tree 4 files changed +48
-31
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+ on :
3+ pull_request :
4+ branches :
5+ - master
6+ push :
7+ branches :
8+ - master
9+ jobs :
10+ build :
11+ name : Build
12+ runs-on : ubuntu-20.04
13+ env :
14+ IMAGE_NAME : whatwg/html-build
15+ steps :
16+ - name : Checkout whatwg/html-build
17+ uses : actions/checkout@v2
18+ with :
19+ fetch-depth : 0
20+ - name : Shellcheck
21+ run : |
22+ shellcheck *.sh
23+ shellcheck ci-build/*.sh
24+ - name : Docker build
25+ run : ci-build/docker-build.sh
26+ - name : Checkout whatwg/html
27+ uses : actions/checkout@v2
28+ with :
29+ repository : whatwg/html
30+ path : html
31+ fetch-depth : 2
32+ - name : Test against whatwg/html
33+ run : |
34+ mkdir output
35+ bash ci-build/docker-run.sh "$GITHUB_WORKSPACE/html" output
36+ - name : Docker login
37+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
38+ uses : docker/login-action@v1
39+ with :
40+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
41+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
42+ - name : Docker push
43+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
44+ run : |
45+ docker tag "$IMAGE_NAME" "$IMAGE_NAME:$GITHUB_SHA"
46+ docker tag "$IMAGE_NAME" "$IMAGE_NAME:latest"
47+ docker push "$IMAGE_NAME:$GITHUB_SHA"
48+ docker push "$IMAGE_NAME:latest"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments