Skip to content

Commit

Permalink
Allow the lint job to continue even if a step errors
Browse files Browse the repository at this point in the history
This is toggled by the same value that toggles a tmate session so that
debugging can be done even if a step fails. We also move the logic
around the remote-shell argument for workflow_dispatch to the
environment value setting.
  • Loading branch information
mcdonnnj committed Jul 18, 2023
1 parent 4980bb8 commit 0e2cc74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ env:
# #65.
PLATFORMS: "linux/amd64"
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
RUN_TMATE: ${{ secrets.RUN_TMATE }}
RUN_TMATE: ${{ github.event.inputs.remote-shell == 'true' || secrets.RUN_TMATE }}

jobs:
lint:
# Checks out the source and runs pre-commit hooks. Detects coding errors
# and style deviations.
name: "Lint sources"
runs-on: ubuntu-latest
continue-on-error: ${{ github.event.inputs.remote-shell == 'true' || false }}
steps:
- id: setup-env
uses: cisagov/setup-env-github-action@develop
Expand Down Expand Up @@ -225,7 +226,7 @@ jobs:
echo tags=${TAGS}
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: github.event.inputs.remote-shell == 'true' || env.RUN_TMATE
if: env.RUN_TMATE
build:
# Builds a single test image for the native platform. This image is saved
# as an artifact and loaded by the test job.
Expand Down

0 comments on commit 0e2cc74

Please sign in to comment.