forked from orange-cloudfoundry/k3s-boshrelease
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.62 KB
/
create-PRs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: create-PRs-based-on-release-branches
permissions:
contents: write # allow git push to repo and the github release and its artefact
on:
workflow_dispatch:
create:
branches:
- release-[0-9]+.[0-9]+ # Only select k3s base branches, not renovate one
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
# *: Matches zero or more characters, but does not match the / character. For example, Octo* matches Octocat.
# **: Matches zero or more of any character.
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
# GH cli is already pre-install, see https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows
- name: Install yq cli
#See https://github.com/marketplace/actions/install-a-binary-from-github-releases
uses: jaxxstorm/action-install-gh-release@c5ead9a448b4660cf1e7866ee22e4dc56538031a # v1.10.0
with:
repo: mikefarah/yq
tag: v4.34.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # reduce potential rate limiting
- name: create-missing-PRs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# configure git
git config --global user.name "workflows/k3s-boshrelease/create-PRs-based-on-release-branches"
git config --global user.email "<>"
git config --global --add safe.directory /github/workspace
./create-missing-PR.bash