create-release-branches #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create-release-branches | |
permissions: | |
contents: write # allow git push to repo and the github release and its artefact | |
on: | |
workflow_call: | |
inputs: | |
force_push: | |
description: 'Force recreation of release branches from min version' | |
required: true | |
type: boolean | |
default: false | |
workflow_dispatch: | |
inputs: | |
force_push: | |
description: 'Force recreation of release branches from min version' | |
required: true | |
type: boolean | |
default: false | |
schedule: | |
- cron: "30 10 * * 1" # “At 10:30 on Monday.” https://crontab.guru/#30_10_*_*_1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 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@25d5e2dd555cd74f1fab9ac1e6ea117acde2c0c4 # v1.12.0 | |
with: | |
repo: mikefarah/yq | |
tag: v4.44.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # reduce potential rate limiting | |
- name: create-missing-branches | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FORCE_PUSH: ${{ inputs.force_push}} | |
run: | | |
# configure git | |
git config --global user.name "workflows/k3s-boshrelease/create-release-branches" | |
git config --global user.email "<>" | |
git config --global --add safe.directory /github/workspace | |
./create-release-branches.bash | |