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 |
runs-on: ubuntu-latest |
||||
steps: |
steps: |
||||
- name: Trigger Workflow and Wait (linuxgsm) |
- name: Trigger Workflow and Wait (linuxgsm) |
||||
uses: convictional/[email protected] |
env: |
||||
with: |
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
||||
owner: GameServerManagers |
run: | |
||||
repo: docker-linuxgsm |
gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-linuxgsm |
||||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
sleep 10 |
||||
workflow_file_name: action-docker-publish.yml |
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: |
trigger_build_docker-gameserver: |
||||
if: github.repository_owner == 'GameServerManagers' |
if: github.repository_owner == 'GameServerManagers' |
||||
@ -29,9 +37,17 @@ jobs: |
|||||
runs-on: ubuntu-latest |
runs-on: ubuntu-latest |
||||
steps: |
steps: |
||||
- name: Trigger Workflow and Wait (gameserver) |
- name: Trigger Workflow and Wait (gameserver) |
||||
uses: convictional/[email protected] |
env: |
||||
with: |
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
||||
owner: GameServerManagers |
run: | |
||||
repo: docker-gameserver |
gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-gameserver |
||||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
sleep 10 |
||||
workflow_file_name: action-docker-publish.yml |
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