Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lenra-io/create-or-update-pr-action
A simple but powerful GitHub Action to link workflows and manage dependencies between projects. #actionshackathon21
https://github.com/lenra-io/create-or-update-pr-action
actions actionshackathon21 ci-cd continuous-integration dependency-manager github-actions learning-by-doing workflow
Last synced: about 1 month ago
JSON representation
A simple but powerful GitHub Action to link workflows and manage dependencies between projects. #actionshackathon21
- Host: GitHub
- URL: https://github.com/lenra-io/create-or-update-pr-action
- Owner: lenra-io
- License: mit
- Created: 2021-11-25T14:20:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-04T09:58:57.000Z (over 2 years ago)
- Last Synced: 2024-10-31T10:48:09.924Z (about 2 months ago)
- Topics: actions, actionshackathon21, ci-cd, continuous-integration, dependency-manager, github-actions, learning-by-doing, workflow
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create or update PR Action
A simple but powerful GitHub Action to link workflows and manage dependencies between projects.
## Usage:
To learn accurately how to use it, you must see the [guide here](/examples)
## Quick Example:
```yaml
# Call `Create or update PR` GitHub action
- name: create_pr
uses: lenra-io/create-or-update-pr-action@main
with:
# The name of the PR to be created.
name: 'Update dependencies'
# The token used to create the PR.
# I didn't use the `secrets.GITHUB_TOKEN` here because this token can't trigger workflow event if we push something or create a PR.
token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
# The message to comment on PR after creation (Can be Markdown)
message: |
# Upgrade ${{ github.event.inputs.origin }} to ${{ github.event.inputs.version }}
# Write a little script called just before the PR creation or update.
# This example will upgrade the version inside of the pubspec.yaml and publish it in a new PR
script: |
# Update the requested dependency version in the pubspec.yaml file
yq eval ".dependencies.${{ github.event.inputs.origin }}.git.ref = \"${{ github.event.inputs.version }}\"" -i pubspec.yaml
# Commit the file to include it to the PR. Don't use `git push`, it's automatic so you don't have to do it yourself.
git add pubspec.yaml
git commit -m "build(deps-dev): Upgrade ${{ github.event.inputs.origin }} to ${{ github.event.inputs.version }}"
```If you need more informations, you can look at this [dev.to post](https://dev.to/lenradevelopers/lenras-automatic-management-of-dependencies-i28)