@@ -16,14 +16,14 @@ jobs:
16
16
runs-on : ubuntu-latest
17
17
steps :
18
18
- name : Checkout whatwg/html-build
19
- uses : actions/checkout@v3
19
+ uses : actions/checkout@v4
20
20
- name : Install Rust toolchain
21
21
uses : actions-rs/toolchain@v1
22
22
with :
23
23
toolchain : stable
24
24
components : rustfmt, clippy
25
25
- name : Cache Cargo dependencies
26
- uses : actions/cache@v3
26
+ uses : actions/cache@v4
27
27
with :
28
28
path : |
29
29
~/.cargo/bin/
@@ -43,18 +43,22 @@ jobs:
43
43
shellcheck *.sh
44
44
shellcheck ci-build/*.sh
45
45
46
- build-and-test-image :
47
- name : Build and Test Image
46
+ build-and-publish :
47
+ name : Build and Publish
48
48
runs-on : ubuntu-latest
49
+ needs : [static-checks]
50
+ permissions :
51
+ contents : read
52
+ packages : write
49
53
steps :
50
54
- name : Checkout whatwg/html-build
51
- uses : actions/checkout@v3
55
+ uses : actions/checkout@v4
52
56
with :
53
57
fetch-depth : 0
54
58
- name : Docker build
55
59
run : ci-build/docker-build.sh
56
60
- name : Checkout whatwg/html
57
- uses : actions/checkout@v3
61
+ uses : actions/checkout@v4
58
62
with :
59
63
repository : whatwg/html
60
64
path : html
@@ -63,23 +67,15 @@ jobs:
63
67
run : |
64
68
mkdir output
65
69
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 :
76
70
- 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
78
73
with :
79
74
registry : ${{ env.REGISTRY }}
80
75
username : ${{ github.actor }}
81
76
password : ${{ secrets.GITHUB_TOKEN }}
82
77
- name : Docker push
78
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
83
79
run : |
84
80
docker tag "$REGISTRY/$IMAGE_NAME" "$REGISTRY/$IMAGE_NAME:$GITHUB_SHA"
85
81
docker tag "$REGISTRY/$IMAGE_NAME" "$REGISTRY/$IMAGE_NAME:latest"
0 commit comments