diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fa6976f..d9af579 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -117,3 +117,26 @@ jobs: wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage chmod +x pyuploadtool-x86_64.AppImage ./pyuploadtool-x86_64.AppImage --appimage-extract-and-run artifacts/* + - name: Trigger appimagetool build + uses: actions/github-script@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const response = await fetch('https://api.github.com/repos/AppImage/appimagetool/actions/workflows/build.yml/dispatches', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${context.github.token}`, + 'Accept': 'application/vnd.github.v3+json', + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + ref: 'main' + }) + }); + + if (!response.ok) { + const error = await response.json(); + throw new Error(`Failed to trigger workflow: ${error.message}`); + } else { + console.log('Workflow triggered successfully'); + }