This is a very basic GitHub Action to simply create a GitHub Pull Request form an existing branch of the given repository to another one. This Action does not commit any of your changes, nor does it create any of the branches it uses. All this action does is create a Pull Request, nothing more.
Note
|
This Action took inspiration of several other PR creating and updating Actions, however none of them seemed to be doing what I needed, so this exists now. |
Input | Required | Description |
---|---|---|
|
|
The GitHub Token to use by this Action (e.g. |
|
|
The title of the PR that should be created/updated (e.g. |
|
|
The source branch name the PR should have (this branch needs to already exist in the repository) |
|
|
The target branch name the PR should have (defaults to the default branch of the repo) |
|
|
The body of the PR to create (e.g. |
|
|
A comma separated list of labels to add to the PR (e.g. |
|
|
A comma separated list of assignees to add to the PR (e.g. |
Important
|
The token used by this action needs to be able to read the GitHub API and access information about the repository you intend to use this Action in as well as be able to create Pull Requests via the GitHub API in that repository. The default ${{ secrets.GITHUB_TOKEN }} is enough for this purpose.
|
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Do some changes to the repo
run: ...
- name: Run Git CCommands
run: |
git checkout -b branch_name
git commit -am 'add som stuff'
git push origin
- name: Create-Update PR
uses: k3rnels-actions/pr-update@v1
id: pr_update
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_title: Awsome PR
pr_source: branch_name
pr_body: |
### Description
Yes you can use Markdown here too
### Changes
* new stuff
- name: Upload Artifact
run: echo "${{ steps.pr_update.outputs.pr_nr }}"
All kinds of contributions are more than welcome! However, if you plan bigger changes please open an issue first to discuss your proposed changes 😉