diff --git a/.github/workflows/openfn-pull.yml b/.github/workflows/openfn-pull.yml new file mode 100644 index 000000000..3649398af --- /dev/null +++ b/.github/workflows/openfn-pull.yml @@ -0,0 +1,34 @@ +on: + workflow_dispatch: + inputs: + projectId: + description: 'OpenFN Project ID' + required: true + apiSecretName: + description: 'OpenFN API Key secret name i.e OPENFN_project_API_KEY' + required: true + pathToConfig: + description: 'Path to config.json' + required: true + branch: + description: 'Branch to commit the project state and spec' + required: true + commitMessage: + description: 'Commit message for project state and spec' + required: true + +jobs: + pull-from-lightning: + runs-on: ubuntu-latest + permissions: + contents: write + name: A job to pull changes from Lightning + steps: + - name: openfn pull and commit + uses: midigofrank/cli-pull-action@v0.8.4 + with: + secret_input: ${{ secrets[inputs.apiSecretName] }} + project_id_input: ${{ inputs.projectId }} + config_path_input: ${{ inputs.pathToConfig }} + branch_input: ${{ inputs.branch }} + commit_message_input: ${{ inputs.commitMessage }}