Skip to content

Commit

Permalink
Fix gha smells
Browse files Browse the repository at this point in the history
- Avoid running CI related actions when no source code has changed
- Use 'if' for upload-artifact action
- Avoid running CI related actions when no source code has changed
- Stop running workflwos when there is a newer commit in PR
  • Loading branch information
ceddy4395 committed Apr 26, 2024
1 parent b8f7f90 commit ad92827
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/canary-release.yml
Expand Up @@ -7,6 +7,26 @@ on:
push:
branches:
- v2
paths:
- yarn.lock
- verdaccioPublish.js
- verdaccio.yml
- rustfmt.toml
- rust-toolchain
- README.md
- package.json
- lerna.json
- gulpfile.js
- Cargo.toml
- Cargo.lock
- babel.config.json
- sciprts/**
- patches/**
- packages/**
- flow-typed/**
- flow-libs/**
- docs/**
- crates/**
workflow_dispatch:

jobs:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -5,10 +5,34 @@ on:
push:
branches:
- v2
paths:
- yarn.lock
- verdaccioPublish.js
- verdaccio.yml
- rustfmt.toml
- rust-toolchain
- README.md
- package.json
- lerna.json
- gulpfile.js
- Cargo.toml
- Cargo.lock
- babel.config.json
- sciprts/**
- patches/**
- packages/**
- flow-typed/**
- flow-libs/**
- docs/**
- crates/**

permissions:
contents: read

concurrency:
group: ${{ github.workflow }} - ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Expand Up @@ -66,6 +66,7 @@ jobs:
run: strip -x packages/*/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{github.repository == 'parcel-bundler/parcel' && success()}}
with:
name: bindings-${{ matrix.name }}
path: packages/*/*/*.node
Expand Down

0 comments on commit ad92827

Please sign in to comment.