-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (34 loc) · 1.43 KB
/
update-flatpak.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
name: Update flatpak manifest
on:
push:
branches: [update-flatpak-manifest-pr]
release:
types: [published]
jobs:
update-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Replace sha512sum
uses: mikefarah/yq@master
with:
cmd: yq eval -i '.modules.[0].sources.[0].url = "https://github.com/swsnr/turnon/archive/refs/tags/$GITHUB_REF_NAME.tar.gz"' flatpak/de.swsnr.turnon.yaml
- name: Replace sha512sum
uses: mikefarah/yq@master
with:
cmd: yq eval -i '.modules.[0].sources.[0].sha512 = "$ARCHIVE_SHA512"' flatpak/de.swsnr.turnon.yaml
- run: echo ARCHIVE_SHA512="$(curl https://github.com/swsnr/turnon/archive/refs/tags/v1.1.0.tar.gz | sha512sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
- name: Substitute environment variables
uses: mikefarah/yq@master
with:
cmd: yq eval -i '(.. | select(tag == "!!str")) |= envsubst' flatpak/de.swsnr.turnon.yaml
- run: git diff
# - uses: peter-evans/create-pull-request@v7
# with:
# commit-message: "Update flatpak manifest for ${{ github.ref_name }}"
# branch: update-flatpak-manifest
# sign-commits: true
# delete-branch: true
# title: "Update flatpak manifest for ${{ github.ref_name }}"
# body: "Automated update of flatpak manifest for release ${{ github.ref_name }}"
# assignees: swsnr