Skip to content

Commit

Permalink
add pipeline name as an optional sync input
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 7, 2024
1 parent fc9c001 commit aa15820
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 aa15820

Please sign in to comment.