Trigger Events
on: push | Trigger on push |
on: pull_request | Trigger on PR |
on: schedule: cron | Scheduled trigger |
on: workflow_dispatch | Manual trigger |
on: release: types: [published] | On release |
Common Steps
actions/checkout@v4 | Check out repository |
actions/setup-node@v4 | Setup Node.js |
actions/setup-python@v5 | Setup Python |
actions/cache@v4 | Cache dependencies |
actions/upload-artifact@v4 | Upload build artifacts |
github/codeql-action | Code security scan |
Expressions
$${{ secrets.MY_SECRET }}#123;${{ secrets.MY_SECRET }}#123; secrets.MY_SECRET ${{ secrets.MY_SECRET }}#125;${{ secrets.MY_SECRET }}#125; | Access secret |
$${{ github.sha }}#123;${{ github.sha }}#123; github.sha ${{ github.sha }}#125;${{ github.sha }}#125; | Commit SHA |
if: github.ref == 'refs/heads/main' | Condition on branch |
needs: [build, test] | Job dependencies |
environment: production | Deployment environment |