Skip to content

Commit

Permalink
add workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Nov 6, 2024
1 parent 3daf08c commit 0127770
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/e2e-test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,28 @@ name: Bridge e2e test
on:
workflow_run:
workflows: [CI]
types:
- requested
branches: [master]
types: [completed]
workflow_dispatch:
inputs:
run_id:
description: "Run id from which artifacts are taken"
required: true

jobs:
e2e-bridge-test:
runs-on: self-hosted
steps:
- name: Retrieve run id
id: retrieve-run-id
run: |
if [[ -n "${{ github.event_name == 'workflow_dispatch' }}" ]]; then
echo "run_id=${{ github.event.inputs.run_id }}" >> $GITHUB_OUTPUT
else
echo "run_id=${{ github.event.workflow_run.id }}" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check g++
id: setup_g_plusplus
run: |
Expand Down Expand Up @@ -73,7 +84,7 @@ jobs:
- name: Download build artifact from triggered workflow
uses: dawidd6/action-download-artifact@v2
with:
run_id: ${{ github.event.workflow_run.id }}
run_id: ${{ steps.retrieve-run-id.outputs.run_id }}
name: binaries
path: target/release
search_artifacts: true

0 comments on commit 0127770

Please sign in to comment.