Skip to content

Commit

Permalink
ci: ensure preview branch is updated daily
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Feb 22, 2024
1 parent 905e174 commit 6cd9913
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update
on:
# Runs at 10:00 UTC every day
schedule:
- cron: '0 10 * * *'
- cron: "0 10 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

jobs:
sync:
sync-candidate:
name: 🔄 Sync version with upstream
environment: "Candidate Branch"
runs-on: ubuntu-latest
Expand All @@ -25,3 +25,16 @@ jobs:
VERSION=$(curl -s https://www.gimp.org/ | grep -Po "span id='ver'>\K[^<]+")
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
sync-preview:
name: 🔄 Sync version with upstream
environment: "Preview Candidate Branch"
runs-on: ubuntu-latest
steps:
- name: 🔄 Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
branch: preview
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
VERSION=$(curl -s https://www.gimp.org/downloads/devel/ | grep -Po "The current development release of GIMP is <b>\K[^<]+")
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml

0 comments on commit 6cd9913

Please sign in to comment.