Files
packages/.github/workflows/update-branch.yml
T
Gilver 16236f11ea feat(ci): better autoupdate commit messages (#4720) (#4739)
* feat(ci): better autoupdate commit messages

* fix: also sort

(cherry picked from commit 7de992923b)

Signed-off-by: RockGrub <RockGrub@users.noreply.github.com>
Co-authored-by: madomado <madonuko@outlook.com>
2025-05-07 21:03:51 +08:00

55 lines
1.6 KiB
YAML

name: Update per branch
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
jobs:
autoupdate:
runs-on: ubuntu-22.04
strategy:
matrix:
branch:
- frawhide
- f40
- f41
- el10
container:
image: ghcr.io/terrapkg/builder:f41
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
- name: Install SSH signing key & Set up git repository
run: |
mkdir -p ${{ runner.temp }}
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key
chmod 0700 ${{ runner.temp }}/signing_key
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run Update
run: |
nbranch="${{ matrix.branch }}"
[ "$nbranch" = 'frawhide' ] && nbranch='f42'
anda update --filters updbranch=1 --labels branch=${{ matrix.branch }},nbranch=$nbranch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_BACKTRACE: full
- name: Save
run: |
if [[ `git status --porcelain` ]]; then
git config user.name "Raboneko"
git config user.email "raboneko@fyralabs.com"
git config gpg.format "ssh"
git config user.signingkey "${{ runner.temp }}/signing_key"
msg="bump(branch): $(anda run andax/ci/update_commit_message.rhai)"
git commit -S -a -m "$msg"
git push -u origin --all
fi