From 6cd99138903128396c174689ee13ed21d495d8ab Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 22 Feb 2024 08:05:16 +0000 Subject: [PATCH] ci: ensure preview branch is updated daily --- .../workflows/sync-version-with-upstream.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-version-with-upstream.yml b/.github/workflows/sync-version-with-upstream.yml index a692c98..6eeb044 100644 --- a/.github/workflows/sync-version-with-upstream.yml +++ b/.github/workflows/sync-version-with-upstream.yml @@ -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: @@ -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 @@ -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 \K[^<]+") + sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml