2022-09-08 21:40:44 +02:00
|
|
|
name: Update MagiskOnWSA
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
2022-09-08 21:57:45 +02:00
|
|
|
actions: write
|
2022-09-08 22:01:18 +02:00
|
|
|
contents: write
|
2022-09-08 21:40:44 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Rename tag
|
|
|
|
run: |
|
|
|
|
URL="$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/latest | jq -r .url)"
|
2022-09-08 23:18:44 +02:00
|
|
|
curl -s -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $URL -d '{"tag_name":"outdated"}' > /dev/null
|
2022-09-08 21:40:44 +02:00
|
|
|
- name: Delete tag
|
|
|
|
run: |
|
2022-09-08 22:27:13 +02:00
|
|
|
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/git/refs/tags/latest
|
2022-09-08 21:40:44 +02:00
|
|
|
- name: Update MagiskOnWSA
|
|
|
|
run: |
|
2022-09-08 22:27:13 +02:00
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"None","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"None","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"None","gapps_var":"Full","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Stable","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Stable","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Stable","gapps_var":"Full","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Canary","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Canary","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"x86_64","magisk_ver":"Canary","gapps_var":"Full","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"None","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"None","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"Stable","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"Stable","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"Canary","gapps_var":"None","tag":"latest","prerelease":"true"}}'
|
|
|
|
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yaml/dispatches -d '{"ref":"master","inputs":{"arch":"ARM64","magisk_ver":"Canary","gapps_var":"Pico","tag":"latest","prerelease":"true"}}'
|
2022-09-08 22:29:08 +02:00
|
|
|
sleep 15m
|
2022-09-08 21:40:44 +02:00
|
|
|
- name: Publish release
|
|
|
|
run: |
|
|
|
|
URL="$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/latest | jq -r .url)"
|
2022-09-08 23:18:44 +02:00
|
|
|
curl -s -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $URL -d '{"prerelease":false}' > /dev/null
|
2022-09-08 21:40:44 +02:00
|
|
|
- name: Delete release
|
|
|
|
run: |
|
2022-09-08 23:18:44 +02:00
|
|
|
ID="$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/outdated | jq -r .id)"
|
|
|
|
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/$ID
|
2022-09-08 22:27:13 +02:00
|
|
|
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/git/refs/tags/outdated
|