diff --git a/.github/workflows/AutoBuild.yml b/.github/workflows/AutoBuild.yml index 3ad4359..93e5f9b 100644 --- a/.github/workflows/AutoBuild.yml +++ b/.github/workflows/AutoBuild.yml @@ -8,17 +8,18 @@ name: AutoBuild -on: -# release: -# types: [published] - -# push: -# branches: -# - master +on: + repository_dispatch: + workflow_dispatch: + inputs: + ssh: + description: 'SSH connection to Actions' + required: true + default: 'false' schedule: - cron: 0 11 * * * - + watch: types: [started] @@ -78,6 +79,13 @@ jobs: source $GITHUB_WORKSPACE/$DIY_SCRIPT source $GITHUB_WORKSPACE/$FUNCTION_SCRIPT && Diy-Part2 + - name: SSH connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Download Packages run: | cd openwrt @@ -136,4 +144,4 @@ jobs: if: env.REMOVE_WORKFLOW_RUNS == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3