mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-10 21:55:11 +01:00
Create update.yaml
This commit is contained in:
parent
5f661556e1
commit
409817ca63
44
.github/workflows/update.yaml
vendored
Normal file
44
.github/workflows/update.yaml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Update MagiskOnWSA
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 0"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
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)"
|
||||||
|
curl -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $URL -d '{"tag_name":"outdated"}'
|
||||||
|
- name: Delete tag
|
||||||
|
run: |
|
||||||
|
curl -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
|
||||||
|
- name: Update MagiskOnWSA
|
||||||
|
run: |
|
||||||
|
curl -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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}}'
|
||||||
|
- 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)"
|
||||||
|
curl -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $URL -d '{"prerelease":false}'
|
||||||
|
- name: Delete release
|
||||||
|
run: |
|
||||||
|
curl -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
|
Loading…
Reference in New Issue
Block a user