Files
poncho-wonky-flatpak/.github/workflows/update.yml
T
kawaiipunk 35326a0e33
CI / Validate scripts and pinned versions (push) Canceled after 0s
CI / Build Flatpak (push) Canceled after 0s
CI / Auto-merge update PR (push) Canceled after 0s
Add automated upstream update workflow
update-version.sh bumps the pinned Patchwork release: it fetches the latest
upstream tag, downloads both tar.gz assets, updates versions.sh, the manifest
and the metainfo, then self-validates with check-versions.sh. A daily cron
workflow commits the bump and opens a PR labeled automerge; the CI workflow
builds the Flatpak in the freedesktop-24.08 container and auto-merges the PR
once the checks pass.
2026-08-13 01:20:42 +02:00

68 lines
2.0 KiB
YAML

name: Update upstream release
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: update-patchwork
cancel-in-progress: true
jobs:
update:
name: Bump to latest Patchwork release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update pinned version
run: ./update-version.sh
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "No upstream changes."
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Open pull request
if: steps.changes.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
source ./versions.sh
BRANCH="update-patchwork-${APP_VERSION}"
if git ls-remote --exit-code --heads origin "${BRANCH}" >/dev/null 2>&1; then
echo "Branch ${BRANCH} already exists (a PR is probably open); nothing to do."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "${BRANCH}"
git add versions.sh nz.scuttlebutt.Patchwork.yaml nz.scuttlebutt.Patchwork.metainfo.xml
git commit -m "Update Patchwork to ${APP_VERSION}"
git push -u origin "${BRANCH}"
BODY=$(cat <<EOF
Bump the pinned Patchwork (Poncho Wonky) release to **${APP_VERSION}**.
- x86_64 sha256: \`${APP_SHA256_X86_64}\`
- aarch64 sha256: \`${APP_SHA256_AARCH64}\`
See https://github.com/soapdog/patchwork/releases/tag/v${APP_VERSION}
CI builds the manifest and this PR auto-merges once the checks pass.
EOF
)
gh pr create --label automerge \
--title "Update Patchwork to ${APP_VERSION}" \
--body "$BODY"