Browse Source

fix(workflows): add PR trigger to version-check; replace archived action in docker trigger

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 dependencies
pull/4903/head
Daniel Gibbs 1 month ago
parent
commit
17622522f0
  1. 40
      .github/workflows/trigger-docker-build.yml
  2. 3
      .github/workflows/version-check.yml

40
.github/workflows/trigger-docker-build.yml

@ -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

3
.github/workflows/version-check.yml

@ -1,6 +1,9 @@
name: Version Check
on:
push:
pull_request:
branches:
- develop
permissions:
contents: read

Loading…
Cancel
Save