@@ -16,14 +16,14 @@ jobs:
1616 runs-on : ubuntu-latest
1717 steps :
1818 - name : Checkout whatwg/html-build
19- uses : actions/checkout@v3
19+ uses : actions/checkout@v4
2020 - name : Install Rust toolchain
2121 uses : actions-rs/toolchain@v1
2222 with :
2323 toolchain : stable
2424 components : rustfmt, clippy
2525 - name : Cache Cargo dependencies
26- uses : actions/cache@v3
26+ uses : actions/cache@v4
2727 with :
2828 path : |
2929 ~/.cargo/bin/
@@ -43,18 +43,22 @@ jobs:
4343 shellcheck *.sh
4444 shellcheck ci-build/*.sh
4545
46- build-and-test-image :
47- name : Build and Test Image
46+ build-and-publish :
47+ name : Build and Publish
4848 runs-on : ubuntu-latest
49+ needs : [static-checks]
50+ permissions :
51+ contents : read
52+ packages : write
4953 steps :
5054 - name : Checkout whatwg/html-build
51- uses : actions/checkout@v3
55+ uses : actions/checkout@v4
5256 with :
5357 fetch-depth : 0
5458 - name : Docker build
5559 run : ci-build/docker-build.sh
5660 - name : Checkout whatwg/html
57- uses : actions/checkout@v3
61+ uses : actions/checkout@v4
5862 with :
5963 repository : whatwg/html
6064 path : html
@@ -63,23 +67,15 @@ jobs:
6367 run : |
6468 mkdir output
6569 bash ci-build/docker-run.sh "$GITHUB_WORKSPACE/html" output
66-
67- publish :
68- name : Publish
69- runs-on : ubuntu-latest
70- needs : [static-checks, build-and-test-image]
71- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
72- permissions :
73- contents : read
74- packages : write
75- steps :
7670 - name : Docker login
77- uses : docker/login-action@v2
71+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
72+ uses : docker/login-action@v3
7873 with :
7974 registry : ${{ env.REGISTRY }}
8075 username : ${{ github.actor }}
8176 password : ${{ secrets.GITHUB_TOKEN }}
8277 - name : Docker push
78+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
8379 run : |
8480 docker tag "$REGISTRY/$IMAGE_NAME" "$REGISTRY/$IMAGE_NAME:$GITHUB_SHA"
8581 docker tag "$REGISTRY/$IMAGE_NAME" "$REGISTRY/$IMAGE_NAME:latest"
0 commit comments