chore(deps): update npm dependencies (major) - autoclosed #129
Workflow file for this run
This file contains 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
# Run it locally with act | |
# 1. Install act: | |
# `brew install act` | |
# 2. Create a .secret file with the following content: | |
# `GITHUB_TOKEN=your_github_token` | |
# PULL REQUEST | |
# 1. Create a act_pull_request.json file in case of a pull request with the following content: | |
# `{"pull_request": {"number": <PR number>, "head": {"ref": "<PR branch name>", "sha": "PR commit sha"}, "base": {"ref": "main"}}, "repository": {"name": "juno", "owner": {"login": "cloudoperators"}}}` | |
# 2. Run the following command: | |
# `act pull_request --container-architecture linux/amd64 -P default=catthehacker/ubuntu:act-latest -j run-pipeline -e act_pull_request.json -W .github/workflows/ci-npm-packages.yaml` | |
name: Detect NPM Package Changes and trigger Pipeline | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "ui/**" | |
# avoid triggering the pipeline if the changes are only in the following directories | |
- "!ui/helpers/**" | |
- "!ui/types/**" | |
- "!ui/utils/**" | |
jobs: | |
run-detect-changes: | |
uses: cloudoperators/juno/.github/workflows/check-changes-npm-package.yaml@main | |
with: | |
paths: "ui" | |
filter-changes: | |
runs-on: ubuntu-latest | |
needs: [run-detect-changes] | |
outputs: | |
filtered-changes: ${{ steps.filter.outputs.filtered-changes }} | |
steps: | |
- name: Filter changes to avoid triggering the pipeline for specific directories | |
id: filter | |
run: | | |
changes='${{ needs.run-detect-changes.outputs.changes }}' | |
filtered_changes=$(echo $changes | jq -c 'map(select(. != "ui/helpers" and . != "ui/types" and . != "ui/utils"))') | |
echo "====" | |
echo "changes=$changes" | |
echo "filtered-changes=$filtered_changes" | |
echo "===" | |
echo "filtered-changes=$filtered_changes" >> $GITHUB_OUTPUT | |
run-pipeline: | |
needs: [filter-changes] | |
strategy: | |
matrix: | |
change: ${{ fromJson(needs.filter-changes.outputs.filtered-changes) }} | |
node: [20.x] | |
fail-fast: false # Allow other jobs to continue if one fails | |
uses: cloudoperators/juno/.github/workflows/pipeline-npm-package.yaml@main | |
with: | |
path: ${{ matrix.change }} | |
node: "${{ matrix.node }}" |