Specify timeouts in GitHub Actions to prevent prolonged tasks
timeout-minutes: 5
Define the default shell as Bash in the workflow settings, enabling pipefail to detect errors during piping.
defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}
Use concurrency to cancel outdated workflows, reducing unnecessary wait times and costs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true #
Control access by disabling default permissions at the workflow level and assigning only necessary permissions per job to minimize security risks.
permissions:
contents: read