Github Action to call a Plural PR Automation. Commonly used to trigger PRs after docker image builds or other CI-native processes that need to be bridged to a GitOps workflow. The action itself is a very thin js wrapper over the gql api call for your Plural Console instance.
url:
description: the url of your Plural Console instance
required: true
token:
description: the token to use to authenticate with Plural Console
required: true
prAutomation:
description: the name of the PR automation to trigger
required: true
branch:
description: the branch to create the PR on
required: true
identifier:
description: the repository identifier slug to use to create the PR, eg "plural/console"
required: false
context:
description: the context to use to create the PR. This must be correctly JSON encoded.
required: false- name: Authenticate
id: plural
uses: pluralsh/setup-plural@v2
with:
consoleUrl: https://my.console.cloud.plural.sh
email: [email protected] # the email bound to your OIDC federated credential
- name: Trigger PR
uses: pluralsh/trigger-pull-request@v1
with:
url: https://my.console.cloud.plural.sh
token: ${{ steps.plural.outputs.consoleToken }}
identifier: pluralsh/plural
branch: test-trigger-pr
prAutomation: test-pr
context: |
{
"input": "some-input"
}For this to be possible you need to have configured the following:
- Federated credential to allow
[email protected]to exchange a GH actions token for a temporary Plural token. This token should have at least the scopecatalog.writeorcreatePullRequest. - A create binding on the
test-prPR automation to allow[email protected]to invoke it. This is not permissible by default. - The
test-prPR automation itself, and the associated credentials in Github or whatever other SCM provider it needs to communicate with.