From c37bdd27354ae1de4b967bc248e547b8c613c706 Mon Sep 17 00:00:00 2001 From: Bojan Rajh Date: Wed, 5 Aug 2026 12:41:01 +0200 Subject: [PATCH 1/2] fix: docs ambiguity --- README.md | 3 ++- downstream/README.md | 12 ++++++------ downstream/action.yml | 6 +++--- saas-preview-environment/README.md | 2 +- saas-preview-environment/action.yml | 2 +- shopware-version/README.md | 4 ++-- update-saas-refs/README.md | 5 +++-- upstream-connect/README.md | 29 +++++++++++++++++------------ versions/README.md | 1 + 9 files changed, 36 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d558325..58ae565 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ A collection of reusable GitHub Actions and Workflows for Shopware extensions an | Action | Description | Link | |--------|-------------|------| -| [saas-preview-environment](saas-preview-environment/) | Creates, migrates or archives a SaaS Preview Environment | [README](saas-preview-environment/README.md) | +| [saas-preview-environment](saas-preview-environment/) | Creates or archives a SaaS Preview Environment | [README](saas-preview-environment/README.md) | +| [update-saas-refs](update-saas-refs/) | Triggers an update of SAAS upstream refs for a given branch | [README](update-saas-refs/README.md) | ### Notifications diff --git a/downstream/README.md b/downstream/README.md index 989f3f1..a779765 100644 --- a/downstream/README.md +++ b/downstream/README.md @@ -16,7 +16,7 @@ Trigger a downstream workflow in another repository and wait for it to finish. |-------|-------------|----------|---------| | `repo` | Downstream repo | Yes | - | | `token-scope` | Scope for the sts token | No | - | -| `workflow` | Workflow to dispatch in downstream | Yes | - | +| `workflow` | Workflow filename to dispatch in downstream (including `.yml` / `.yaml` suffix) | Yes | - | | `ref` | Downstream ref (`.auto` to auto-detect matching refs) | No | `.auto` | | `refFallback` | Fallback ref in case there's no matching branch | No | `trunk` | | `env` | Environment variables to pass to downstream workflow | No | - | @@ -48,7 +48,7 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml ref: trunk ``` @@ -62,7 +62,7 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml ref: .auto refFallback: trunk ``` @@ -77,7 +77,7 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml env: | PLATFORM_BRANCH=trunk FOO=bar @@ -93,7 +93,7 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml timeout: 60m poll_interval: 1m ``` @@ -108,7 +108,7 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml token: ${{ secrets.CUSTOM_TOKEN }} ``` diff --git a/downstream/action.yml b/downstream/action.yml index 0a8a584..c486884 100644 --- a/downstream/action.yml +++ b/downstream/action.yml @@ -1,5 +1,5 @@ name: "Downstream workflow" -description: "Trigger a downstream worflow in another repository" +description: "Trigger a downstream workflow in another repository" author: "shopware AG" branding: color: "blue" @@ -10,10 +10,10 @@ inputs: description: "Downstream repo" required: true token-scope: - description: "Scrope for the sts token" + description: "Scope for the sts token" required: false workflow: - description: "Workflow to dispatch in downstream" + description: "Workflow filename to dispatch in downstream (including .yml / .yaml suffix)" required: true ref: description: "Downstream ref, automatically detects matching refs with .auto" diff --git a/saas-preview-environment/README.md b/saas-preview-environment/README.md index dc91a82..a55fc5f 100644 --- a/saas-preview-environment/README.md +++ b/saas-preview-environment/README.md @@ -1,6 +1,6 @@ # SaaS Preview Environment -Create, migrate or archive a SaaS Preview Environment. +Create or archive a SaaS Preview Environment. ## What it does diff --git a/saas-preview-environment/action.yml b/saas-preview-environment/action.yml index 855fac2..a420410 100644 --- a/saas-preview-environment/action.yml +++ b/saas-preview-environment/action.yml @@ -1,5 +1,5 @@ name: SaaS Preview Environment -description: "Create, migrate or archive a SaaS Preview Environment" +description: "Create or archive a SaaS Preview Environment" author: "shopware AG" branding: color: "blue" diff --git a/shopware-version/README.md b/shopware-version/README.md index 4cf3960..06a260b 100644 --- a/shopware-version/README.md +++ b/shopware-version/README.md @@ -17,7 +17,7 @@ Gets the Shopware version that matches the current branch. | `ref` | The git reference to match (defaults to `github.ref`) | No | - | | `base-ref` | The base reference for pull requests (defaults to `github.base_ref`) | No | - | | `head-ref` | The head reference for pull requests (defaults to `github.head_ref`) | No | - | -| `shopware-github-token` | Token used for checking out the shopware repository | No | - | +| `github-token` | GitHub token used to authenticate gh API calls | No | `${{ github.token }}` | ## Outputs @@ -51,7 +51,7 @@ Gets the Shopware version that matches the current branch. with: repo: my-org/shopware fallback: trunk - shopware-github-token: ${{ secrets.SHOPWARE_TOKEN }} + github-token: ${{ secrets.SHOPWARE_TOKEN }} ``` ### Using the output diff --git a/update-saas-refs/README.md b/update-saas-refs/README.md index ed2de51..2ff45ac 100644 --- a/update-saas-refs/README.md +++ b/update-saas-refs/README.md @@ -1,16 +1,17 @@ # Update SAAS Refs Action -Action to create a PR with updated SAAS refs for a given branch. +Action to trigger an update of SAAS upstream refs for a given branch. ## What it does 1. Checks if the target branch exists in the saas repository -2. create a PR to update the upstream refs in the target branch to the latest commit +2. Triggers the `core-update.yml` workflow in `shopware/saas` to update upstream refs on that branch ## Inputs | Input | Description | Required | Default | |-----------------|--------------------------------------|----------|---------| +| `pull_request` | The pull request that triggered the update | No | `${{ github.event.pull_request }}` | | `target-branch` | target branch in the saas repository | No | `${{ github.base_ref }}` | ## Usage diff --git a/upstream-connect/README.md b/upstream-connect/README.md index c6a03c8..808e70d 100644 --- a/upstream-connect/README.md +++ b/upstream-connect/README.md @@ -5,8 +5,8 @@ Connects to upstream from downstream run. ## What it does 1. Receives upstream data from a triggered workflow -2. Sets environment variables from the upstream run -3. Displays information about the upstream workflow that triggered the run +2. Displays information about the upstream workflow that triggered the run +3. Sets custom environment variables passed from the upstream run ## Inputs @@ -37,15 +37,17 @@ jobs: ### Accessing upstream data -After using this action, the following environment variables are available: +This action logs the upstream workflow run URL when `upstream_data` contains upstream metadata. -- `upstream.id`: The run ID of the upstream workflow -- `upstream.ref`: The ref of the upstream workflow -- `upstream.repo`: The repository of the upstream workflow -- `upstream.github-token`: The GitHub token from upstream -- `upstream.url`: URL to the upstream workflow run +Custom environment variables passed from upstream via the `env` input of the downstream action are written to `$GITHUB_ENV` and become available to later steps. -Any custom environment variables passed from upstream via the `env` input of the downstream action will also be set. +Upstream metadata (`id`, `ref`, `repo`, `url`, etc.) stays inside the JSON `upstream_data` input. Access it with `fromJSON`, for example: + +```yaml +- run: | + echo "Triggered by: ${{ fromJSON(inputs.upstream_data).upstream.repo }}" + echo "Run URL: ${{ fromJSON(inputs.upstream_data).upstream.url }}" +``` ## Example: Combined with downstream action @@ -58,8 +60,11 @@ jobs: - uses: shopware/github-actions/downstream@main with: repo: my-org/my-repo - workflow: test + workflow: test.yml ref: trunk + env: | + PLATFORM_BRANCH=trunk + FOO=bar ``` **Downstream workflow:** @@ -78,6 +83,6 @@ jobs: with: upstream_data: ${{ inputs.upstream_data }} - run: | - echo "Triggered by: ${{ env.upstream.repo }}" - echo "Run URL: ${{ env.upstream.url }}" + echo "Custom env from upstream: $PLATFORM_BRANCH $FOO" + echo "Upstream run URL: ${{ fromJSON(inputs.upstream_data).upstream.url }}" ``` diff --git a/versions/README.md b/versions/README.md index 996318b..455893d 100644 --- a/versions/README.md +++ b/versions/README.md @@ -14,6 +14,7 @@ Gets the first and latest versions of the current and previous (LTS) major versi |-------|-------------|----------|---------| | `major` | Current major prefix (e.g., `v6.7.`) | No | `v6.7.` | | `lts-major` | LTS major prefix (e.g., `v6.6.`) | No | `v6.6.` | +| `github-token` | Token used to check for release branches via the GitHub API | No | `${{ github.token }}` | ## Outputs From 08be179b87e6be676a87582b2d8e9e9346d262ef Mon Sep 17 00:00:00 2001 From: Bojan Rajh <117360292+bojanrajh@users.noreply.github.com> Date: Wed, 5 Aug 2026 13:19:09 +0200 Subject: [PATCH 2/2] fix: Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- update-saas-refs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-saas-refs/README.md b/update-saas-refs/README.md index 2ff45ac..1f7ad37 100644 --- a/update-saas-refs/README.md +++ b/update-saas-refs/README.md @@ -11,7 +11,7 @@ Action to trigger an update of SAAS upstream refs for a given branch. | Input | Description | Required | Default | |-----------------|--------------------------------------|----------|---------| -| `pull_request` | The pull request that triggered the update | No | `${{ github.event.pull_request }}` | +| `pull_request` | The pull request that triggered the update | Yes | `${{ github.event.pull_request }}` | | `target-branch` | target branch in the saas repository | No | `${{ github.base_ref }}` | ## Usage