-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (43 loc) · 2.15 KB
/
update-sdk-snap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Update SDK Snap
on:
# Runs at 10:00 UTC every day
schedule:
- cron: "0 10 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync-sdk:
name: Sync version of the SDK snap with upstream
environment: "2404 Branch"
runs-on: ubuntu-latest
steps:
- name: Sync version with upstream
uses: snapcrafters/ci/sync-version@main
id: sync-sdk-version
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
branch: "2404"
snapcraft-project-root: "webkitgtk-6-gnome-2404-sdk"
update-script: |
latest_tag=$(git ls-remote --refs --sort='v:refname' --tags https://gitlab.gnome.org/GNOME/gnome-build-meta.git | awk -F'/' '{print $NF}' | grep -E '^[0-9]+(\.[0-9]+)*$' | sort -V | tail -n 1)
webkitgtk_version=$(curl -s "https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/${latest_tag}/elements/sdk/webkitgtk.inc?ref_type=tags" | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
yq -i ".version=\"$webkitgtk_version\"" webkitgtk-6-gnome-2404-sdk/snapcraft.yaml
sync-content-version:
needs: sync-sdk
name: Sync version of the content snap with upstream
environment: "2404 Branch"
runs-on: ubuntu-latest
steps:
- name: Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
branch: "2404"
snapcraft-project-root: "webkitgtk-6-gnome-2404"
update-script: |
latest_tag=$(git ls-remote --refs --sort='v:refname' --tags https://gitlab.gnome.org/GNOME/gnome-build-meta.git | awk -F'/' '{print $NF}' | grep -E '^[0-9]+(\.[0-9]+)*$' | sort -V | tail -n 1)
webkitgtk_version=$(curl -s "https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/${latest_tag}/elements/sdk/webkitgtk.inc?ref_type=tags" | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
yq -i ".version=\"$webkitgtk_version\"" webkitgtk-6-gnome-2404/snapcraft.yaml