Created
May 18, 2022 21:41
-
-
Save ali-kamalizade/7916725199ae5feee29e5c2f509a1321 to your computer and use it in GitHub Desktop.
A sample GitHub workflow using the GitHub ref to conditionally skip steps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ci_web: | |
name: "Build & Tests & Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout project" | |
uses: actions/checkout@v3 | |
- name: "Use Node.js" | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .node-version | |
- name: "Install npm dependencies" | |
run: "npm ci" | |
- name: "Lint code" | |
if: github.ref != 'refs/heads/main' | |
run: "npm run lint" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment