Skip to content

Commit

Permalink
Add flag for snapshots incase they're provided
Browse files Browse the repository at this point in the history
  • Loading branch information
midigofrank committed Jul 9, 2024
1 parent d93758d commit 7b9a537
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
commit_message_input:
description: "Pull Commit Message"
required: true
snapshots_input:
description: 'IDs of snapshots separated by spaces'
required: false
runs:
using: "composite"
steps:
Expand All @@ -32,7 +35,12 @@ runs:
node-version: 18.x
- run: |
npm install -g @openfn/cli
openfn pull $OPENFN_PROJECT_ID --config-path $OPENFN_CONFIG_PATH --no-confirm
if [ -z "${{ inputs.snapshots_input }}" ]; then
openfn pull $OPENFN_PROJECT_ID --config-path $OPENFN_CONFIG_PATH --no-confirm
else
openfn pull $OPENFN_PROJECT_ID --config-path $OPENFN_CONFIG_PATH --snapshots ${{ inputs.snapshots_input }} --no-confirm
fi
shell: bash
env:
OPENFN_API_KEY: ${{ inputs.secret_input }}
Expand Down

0 comments on commit 7b9a537

Please sign in to comment.