DistroHopper/.github/workflows/track-upstream.yml

47 lines
1.4 KiB
YAML

name: Track upstream quickemu
# Snapshot upstream quickemu's merged PRs, open PRs and open issues into
# docs/upstream-quickemu.md so the status is easy to follow without leaving
# GitHub. See scripts/track-upstream.sh for the rendering logic.
on:
schedule:
- cron: '0 2 * * *' # daily 02:00 UTC
workflow_dispatch:
permissions:
contents: write
concurrency:
group: track-upstream
cancel-in-progress: false
jobs:
track:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Generate upstream activity digest
env:
GH_TOKEN: ${{ github.token }}
run: |
chmod a+x scripts/track-upstream.sh
./scripts/track-upstream.sh
- name: Commit tracking update
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
BRANCH="${GITHUB_REF_NAME:-$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||')}"
if ! git status --porcelain -- docs/upstream-quickemu.md | grep -q .; then
echo "No upstream activity change to commit."
exit 0
fi
git checkout -B "${BRANCH}"
git add docs/upstream-quickemu.md
git commit -m "docs: track upstream quickemu activity"
git push origin "${BRANCH}"