Browse Source
version-check.yml: - Add pull_request trigger targeting develop so version format is validated on PRs before merge trigger-docker-build.yml: - Replace archived convictional/[email protected] with native gh CLI approach (trigger + watch run ID) - Uses GH_TOKEN env var with PERSONAL_ACCESS_TOKEN secret - gh workflow run dispatches the workflow; gh run watch polls for completion and exits non-zero on failure, preserving job dependenciespull/4903/head
2 changed files with 31 additions and 12 deletions
@ -15,12 +15,20 @@ jobs: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Trigger Workflow and Wait (linuxgsm) |
|||
uses: convictional/[email protected] |
|||
with: |
|||
owner: GameServerManagers |
|||
repo: docker-linuxgsm |
|||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
|||
workflow_file_name: action-docker-publish.yml |
|||
env: |
|||
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
|||
run: | |
|||
gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-linuxgsm |
|||
sleep 10 |
|||
run_id=$(gh run list \ |
|||
--workflow action-docker-publish.yml \ |
|||
--repo GameServerManagers/docker-linuxgsm \ |
|||
--limit 1 \ |
|||
--json databaseId \ |
|||
--jq '.[0].databaseId') |
|||
gh run watch "${run_id}" \ |
|||
--repo GameServerManagers/docker-linuxgsm \ |
|||
--exit-status |
|||
|
|||
trigger_build_docker-gameserver: |
|||
if: github.repository_owner == 'GameServerManagers' |
|||
@ -29,9 +37,17 @@ jobs: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Trigger Workflow and Wait (gameserver) |
|||
uses: convictional/[email protected] |
|||
with: |
|||
owner: GameServerManagers |
|||
repo: docker-gameserver |
|||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
|||
workflow_file_name: action-docker-publish.yml |
|||
env: |
|||
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
|||
run: | |
|||
gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-gameserver |
|||
sleep 10 |
|||
run_id=$(gh run list \ |
|||
--workflow action-docker-publish.yml \ |
|||
--repo GameServerManagers/docker-gameserver \ |
|||
--limit 1 \ |
|||
--json databaseId \ |
|||
--jq '.[0].databaseId') |
|||
gh run watch "${run_id}" \ |
|||
--repo GameServerManagers/docker-gameserver \ |
|||
--exit-status |
|||
|
|||
Loading…
Reference in new issue