Files
homebrew-tap/.github/workflows/bump.yml
T

44 lines
1.1 KiB
YAML

name: Bump formulae
on:
schedule:
- cron: "17 */2 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
bump:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- run: |
echo "BUMP_DIR=$RUNNER_TEMP/bumps" >> "$GITHUB_ENV"
mkdir -p "$RUNNER_TEMP/bumps"
# Each script edits its own files and leaves committing to the next step,
# so the parallel steps never race for the git index.
- parallel:
- name: Bump netbird
run: .github/scripts/bump-netbird.sh
- name: Bump zshellcheck
run: .github/scripts/bump-zshellcheck.sh
- name: Commit and push
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
shopt -s nullglob
for record in "$BUMP_DIR"/*; do
mapfile -t lines < "$record"
git add -- "${lines[@]:1}"
git commit -m "${lines[0]}"
done
git diff --quiet origin/main HEAD || git push