1414
1515 steps :
1616 - name : Checkout code
17- uses : actions/checkout@v3
17+ uses : actions/checkout@v4
1818
1919 # TODO: This is a 3rd party GitHub action from some dude. Ideally, we'd
2020 # use something more "official".
3434
3535 steps :
3636 - name : Checkout code
37- uses : actions/checkout@v3
37+ uses : actions/checkout@v4
3838
3939 - name : Login to GitHub Container Registry
4040 uses : docker/login-action@v2
5555 outputs : type=docker,dest=/tmp/note_c_ci_image.tar
5656
5757 - name : Upload image artifact
58- uses : actions/upload-artifact@v3
58+ uses : actions/upload-artifact@v4
5959 with :
6060 name : note_c_ci_image
6161 path : /tmp/note_c_ci_image.tar
6767
6868 steps :
6969 - name : Checkout code
70- uses : actions/checkout@v3
70+ uses : actions/checkout@v4
7171
7272 - name : Load CI Docker image
7373 # Only load the Docker image artifact if build_ci_docker_image actually
8686
8787 steps :
8888 - name : Checkout code
89- uses : actions/checkout@v3
89+ uses : actions/checkout@v4
9090
9191 - name : Load CI Docker image
9292 # Only load the Docker image artifact if build_ci_docker_image actually
@@ -105,9 +105,11 @@ jobs:
105105
106106 steps :
107107 - name : Checkout code
108- uses : actions/checkout@v3
108+ uses : actions/checkout@v4
109109
110110 - name : Load CI Docker image
111+ # Only load the Docker image artifact if build_ci_docker_image actually
112+ # ran (e.g. it wasn't skipped and was successful).
111113 if : ${{ needs.build_ci_docker_image.result == 'success' }}
112114 uses : ./.github/actions/load-ci-image
113115
@@ -131,9 +133,11 @@ jobs:
131133
132134 steps :
133135 - name : Checkout code
134- uses : actions/checkout@v3
136+ uses : actions/checkout@v4
135137
136138 - name : Load CI Docker image
139+ # Only load the Docker image artifact if build_ci_docker_image actually
140+ # ran (e.g. it wasn't skipped and was successful).
137141 if : ${{ needs.build_ci_docker_image.result == 'success' }}
138142 uses : ./.github/actions/load-ci-image
139143
@@ -147,17 +151,38 @@ jobs:
147151 needs : [build_ci_docker_image]
148152
149153 steps :
150- - name : Checkout Code
151- uses : actions/checkout@v3
154+ - name : Checkout code
155+ uses : actions/checkout@v4
152156
153157 - name : Load CI Docker image
158+ # Only load the Docker image artifact if build_ci_docker_image actually
159+ # ran (e.g. it wasn't skipped and was successful).
154160 if : ${{ needs.build_ci_docker_image.result == 'success' }}
155161 uses : ./.github/actions/load-ci-image
156162
157163 - name : Run astyle
158164 run : |
159165 docker run --rm --volume $(pwd):/note-c/ --workdir /note-c/ --entrypoint ./scripts/run_astyle.sh ghcr.io/blues/note_c_ci:latest
160166
167+ run_cppcheck :
168+ runs-on : ubuntu-latest
169+ if : ${{ always() }}
170+ needs : [build_ci_docker_image]
171+
172+ steps :
173+ - name : Checkout code
174+ uses : actions/checkout@v4
175+
176+ - name : Load CI Docker image
177+ # Only load the Docker image artifact if build_ci_docker_image actually
178+ # ran (e.g. it wasn't skipped and was successful).
179+ if : ${{ needs.build_ci_docker_image.result == 'success' }}
180+ uses : ./.github/actions/load-ci-image
181+
182+ - name : Run cppcheck
183+ run : |
184+ docker run --rm --volume $(pwd):/note-c/ --workdir /note-c/ --entrypoint ./scripts/run_cppcheck.sh ghcr.io/blues/note_c_ci:latest
185+
161186 publish_ci_image :
162187 runs-on : ubuntu-latest
163188 # Make sure unit tests unit tests passed before publishing.
0 commit comments