Skip to content

Commit

Permalink
test pipeline with workflows from cloudoperators
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtieReus committed Jun 26, 2024
1 parent bc756a1 commit 2e88c4b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci-npm-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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:
- "apps/**"

jobs:
run-detect-changes:
uses: cloudoperators/juno/.github/workflows/check-changes-npm-package.yaml@main
with:
paths: "apps"

run-pipeline:
needs: [run-detect-changes]
strategy:
matrix:
change: ${{fromJson(needs.run-detect-changes.outputs.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 }}"

0 comments on commit 2e88c4b

Please sign in to comment.