Connects to upstream from downstream run.
- Receives upstream data from a triggered workflow
- Sets environment variables from the upstream run
- Displays information about the upstream workflow that triggered the run
| Input | Description | Required | Default |
|---|---|---|---|
upstream_data |
Upstream data (pass-through from workflow_dispatch event input) | Yes | - |
on:
workflow_dispatch:
inputs:
upstream_data:
required: false
jobs:
id:
runs-on: ubuntu-latest
steps:
- if: ${{ inputs.upstream_data }}
uses: shopware/github-actions/upstream-connect@main
with:
upstream_data: ${{ inputs.upstream_data }}After using this action, the following environment variables are available:
upstream.id: The run ID of the upstream workflowupstream.ref: The ref of the upstream workflowupstream.repo: The repository of the upstream workflowupstream.github-token: The GitHub token from upstreamupstream.url: URL to the upstream workflow run
Any custom environment variables passed from upstream via the env input of the downstream action will also be set.
Upstream workflow:
jobs:
trigger-downstream:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/downstream@main
with:
repo: my-org/my-repo
workflow: test
ref: trunkDownstream workflow:
on:
workflow_dispatch:
inputs:
upstream_data:
required: false
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/upstream-connect@main
with:
upstream_data: ${{ inputs.upstream_data }}
- run: |
echo "Triggered by: ${{ env.upstream.repo }}"
echo "Run URL: ${{ env.upstream.url }}"