Use GitHub Actions native features and follow best practices to create maintainable, secure, and reliable CI workflows: 1. **Use working-directory instead of manual cd commands**
Use GitHub Actions native features and follow best practices to create maintainable, secure, and reliable CI workflows:
update-existing: $
# DO THIS - scope permissions per job
jobs:
build:
permissions:
contents: read
attestations: write
id-token: write
# INSTEAD OF THIS - overly broad permissions
permissions:
contents: read
attestations: write
id-token: write
These practices improve workflow reliability, security, and maintainability while making troubleshooting easier.
Enter the URL of a public GitHub repository