Don't create /continue on macOS
sudo touch /continue does not work on macOS as the root is a read-only filesystem.
Wouldn't an even better suggestion be to end all shells in the tmate session (e.g. via Ctrl+d) thereby ending the tmate session? That should end action-tmate, too, without any concerns about read-only filesystems.
Sorry, not sure I'm on the same page here - I don't want to end the tmate session, rather I want the github workflow to continue while the tmate session is available.
Sorry, not sure I'm on the same page here - I don't want to end the tmate session, rather I want the github workflow to continue while the tmate session is available.
Okay, got it. I had not realized that continue didn't end the session.
I'm curious, though, how useful this feature is, as you'll typically be in the middle of things when the workflow finishes and your tmate session is forcefully stopped, no?
That will happen, definitely.
How I arrive at this situation is that I inserted the workflow in one particular step, I used tmate to fix it, but I didn't move the workflow down to another step when I re-ran the build and I got another error elsewhere. In this case it's still quite useful to have the session hang around, see the next error, and quickly diagnose it before the workflow finishes.
That will happen, definitely.
I wonder, then, whether we want to change the post-Action code we added for the detached mode: currently it exits when the continue file exists, i.e. it lets the workflow finish (force-stopping tmate). We probably want to treat it as if the user "switched to detached mode", until detecting that the tmate session was ended by the user.
name: Fortify on Demand Scan
TODO: Customize trigger events based on your DevSecOps processes and typical FoD SAST scan time
on: workflow_dispatch: push: branches: [ "master" ] schedule: - cron: '39 19 * * 6'
jobs: FoD-SAST-Scan: # Use the appropriate runner for building your source code. # TODO: Use a Windows runner for .NET projects that use msbuild. Additional changes to RUN commands will be required to switch to Windows syntax. runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write
steps:
# Check out source code
- name: Check Out Source Code
uses: actions/checkout@v3
# Java is required to run the various Fortify utilities.
# When scanning a Java application, please use the appropriate Java version for building your application.
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'