Skip to content

pluralsh/trigger-pull-request

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trigger-pull-request Github Action

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.

Inputs

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

Example Usage

- 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:

  1. Federated credential to allow [email protected] to exchange a GH actions token for a temporary Plural token. This token should have at least the scope catalog.write or createPullRequest.
  2. A create binding on the test-pr PR automation to allow [email protected] to invoke it. This is not permissible by default.
  3. The test-pr PR automation itself, and the associated credentials in Github or whatever other SCM provider it needs to communicate with.

About

Github Action to call a Plural PR Automation

Resources

License

Stars

Watchers

Forks

Packages

No packages published