Skip to content

Commit

Permalink
🌱 Fix hanging docker jobs for doc only changes. (ossf#3292)
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Allen Shearin <[email protected]>
  • Loading branch information
spencerschrock authored and ashearin committed Nov 13, 2023
1 parent acdfaff commit a5e2c78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,24 @@ jobs:
permissions:
contents: read
needs: docs_only_check
if: (needs.docs_only_check.outputs.docs_only != 'true')
# ideally we put one "if" here, but due to how skipped matrix jobs work, we need one for each each step
# https://github.com/orgs/community/discussions/9141
steps:
- name: Harden Runner
if: (needs.docs_only_check.outputs.docs_only != 'true')
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Clone the code
if: (needs.docs_only_check.outputs.docs_only != 'true')
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup Go # needed for some of the Makefile evaluations, even if building happens in Docker
if: (needs.docs_only_check.outputs.docs_only != 'true')
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: ${{ env.GO_VERSION_FILE }}
check-latest: true
cache: false # the building happens in Docker, so saving this cache would negatively impact other builds
- name: docker build
if: (needs.docs_only_check.outputs.docs_only != 'true')
run: make ${{ matrix.target }}

0 comments on commit a5e2c78

Please sign in to comment.