42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: Bump formulae
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "17 */2 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
bump:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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 last step, so every bump
|
|
# gets its own commit. The scripts ask api.github.com without a token: two requests per run
|
|
# is far below the 60 an hour GitHub allows per IP.
|
|
- 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 "gitea-actions"
|
|
git config user.email "gitea-actions@git.trivk.dev"
|
|
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
|