Skip to content

Commit

Permalink
Merge pull request #3194 from mashehu/add-input-to-sync-gha
Browse files Browse the repository at this point in the history
add pipeline name as an optional sync input
  • Loading branch information
mashehu authored Oct 7, 2024
2 parents fc9c001 + aa15820 commit 6a2b0af
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
description: "Force a PR to be created"
type: boolean
default: false
pipeline:
description: "Pipeline to sync"
type: string
default: "all"

# Cancel if a newer run is started
concurrency:
Expand All @@ -35,6 +39,14 @@ jobs:
run: |
if [ "${{ github.event.inputs.testpipeline }}" == "true" ]; then
echo '{"pipeline":["testpipeline"]}' > pipeline_names.json
elif [ "${{ github.event.inputs.pipeline }}" != "all" ]; then
curl -O https://nf-co.re/pipeline_names.json
# check if the pipeline exists
if ! grep -q "\"${{ github.event.inputs.pipeline }}\"" pipeline_names.json; then
echo "Pipeline ${{ github.event.inputs.pipeline }} does not exist"
exit 1
fi
echo '{"pipeline":["${{ github.event.inputs.pipeline }}"]}' > pipeline_names.json
else
curl -O https://nf-co.re/pipeline_names.json
fi
Expand Down

0 comments on commit 6a2b0af

Please sign in to comment.