Skip to content

Commit

Permalink
Double-check that fromJson() syntax is working
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Jan 22, 2025
1 parent 3496f61 commit af878c6
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/multi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ jobs:
echo "branches=$JSON_ARRAY" >> "$GITHUB_OUTPUT"
echo "Branches: $JSON_ARRAY" >> "$GITHUB_STEP_SUMMARY"
echo "\`dry_run\`: ${{ inputs.dry_run }}" >> "$GITHUB_STEP_SUMMARY"
echo "\`!dry_run\`: ${{ !inputs.dry_run }}" >> "$GITHUB_STEP_SUMMARY"
echo "\`dry_run=='true'\`: ${{ inputs.dry_run == 'true' }}" >> "$GITHUB_STEP_SUMMARY"
echo "\`dry_run=='false'\`: ${{ inputs.dry_run == 'false' }}" >> "$GITHUB_STEP_SUMMARY"
echo "\`fromJson(dry_run)\`: ${{ fromJson(inputs.dry_run) }}" >> "$GITHUB_STEP_SUMMARY"
echo "\`!fromJson(dry_run)\`: ${{ !fromJson(inputs.dry_run) }}" >> "$GITHUB_STEP_SUMMARY"
publish_each:
runs-on: ubuntu-latest
needs: prepare
if: ${{ inputs.dry_run == 'false' }}
if: ${{ !fromJson(inputs.dry_run) }}
strategy:
# Each job pushes an automated commit to wimods.net@master, so running them all in parallel
# would likely cause conflicts. Also, various servers might hit rate limits if we just upload
Expand Down Expand Up @@ -78,24 +76,24 @@ jobs:
)
# Convert to single line and escape quotes
echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT"
- name: Trigger publish workflow
id: publish_dispatch
uses: codex-/return-dispatch@v2
with:
token: ${{ github.token }}
owner: Wurst-Imperium
repo: Mo-Glass
ref: ${{ matrix.branch }}
workflow: publish.yml
workflow_inputs: ${{ steps.publish_inputs.outputs.json }}
- name: Wait for publish workflow to finish (run ${{ steps.publish_dispatch.outputs.run_id }})
uses: codex-/await-remote-run@v1
with:
token: ${{ github.token }}
owner: Wurst-Imperium
repo: Mo-Glass
run_id: ${{ steps.publish_dispatch.outputs.run_id }}
run_timeout_seconds: 600 # 10 minutes
# - name: Trigger publish workflow
# id: publish_dispatch
# uses: codex-/return-dispatch@v2
# with:
# token: ${{ github.token }}
# owner: Wurst-Imperium
# repo: Mo-Glass
# ref: ${{ matrix.branch }}
# workflow: publish.yml
# workflow_inputs: ${{ steps.publish_inputs.outputs.json }}
# - name: Wait for publish workflow to finish (run ${{ steps.publish_dispatch.outputs.run_id }})
# uses: codex-/await-remote-run@v1
# with:
# token: ${{ github.token }}
# owner: Wurst-Imperium
# repo: Mo-Glass
# run_id: ${{ steps.publish_dispatch.outputs.run_id }}
# run_timeout_seconds: 600 # 10 minutes

announce:
runs-on: ubuntu-latest
Expand Down

0 comments on commit af878c6

Please sign in to comment.