use gh api instead of curl in gh actions (#24221)

This commit is contained in:
Jason2866 2025-12-14 13:38:02 +01:00 committed by GitHub
parent e8a38813b7
commit c06dfcffa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 14 deletions

View File

@ -1,4 +1,3 @@
name: Build_development
on:
@ -130,9 +129,6 @@ jobs:
PYTHONIOENCODING: utf-8
PYTHONUTF8: '1'
run: platformio run -e ${{ matrix.variant }}
#- name: Use esp32-solo1 safeboot for esp32 too
#run: |
#cp ./build_output/firmware/tasmota32solo1-safeboot.bin ./build_output/firmware/tasmota32-safeboot.bin
- name: Upload safeboot firmware artifacts
uses: actions/upload-artifact@v4
with:
@ -310,10 +306,11 @@ jobs:
Start_final_copy:
needs: [base-images, base32-images, language-images]
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
steps:
- name: Dispatch workflow in arendst/Tasmota-firmware
run: |
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.API_TOKEN_GITHUB }} \
--data '{"ref": "gh_actions"}'
gh api repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
--method POST \
-f ref='gh_actions'

View File

@ -249,7 +249,6 @@ jobs:
run: ls -R ./release/
- name: Release
uses: jason2866/action-gh-release@v1.2
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.run_number }}
files: |
@ -260,10 +259,11 @@ jobs:
Start_final_copy:
needs: Release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
steps:
- name: Dispatch workflow in arendst/Tasmota-firmware
run: |
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.API_TOKEN_GITHUB }} \
--data '{"ref": "gh_actions"}'
gh api repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
--method POST \
-f ref='gh_actions'