Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
- name: Upload published-exports artifact
uses: actions/upload-artifact@v4
with:
name: published-exports
name: published-exports-pr-${{ needs.prepare.outputs.pr-number }}
path: published-exports/
if-no-files-found: error
retention-days: 7
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/workspace-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ jobs:
path: ./context
if_no_artifact_found: fail

- name: Check workspace from context
- name: Check context for workspace and PR
id: context
run: |
workspace=$(jq -r .workspace ./context/meta.json)
workspace=$(jq -r '.workspace // ""' ./context/meta.json)
pr=$(jq -r '.pr // ""' ./context/meta.json)
echo "workspace=$workspace" >> $GITHUB_OUTPUT
echo "pr=$pr" >> $GITHUB_OUTPUT
if [ -z "$workspace" ]; then
echo "No workspace in context - skipping tests"
fi

# note: the 'pr:' filter is intentionally omitted as it is unreliable for comment-triggered
# workflows on forks. PR is verified manually in the next step.
- name: Download latest published-exports artifact
if: steps.context.outputs.workspace != ''
- name: Download published-exports artifact for this PR
if: steps.context.outputs.workspace != '' && steps.context.outputs.pr != ''
uses: dawidd6/action-download-artifact@v6
with:
name: published-exports
name: published-exports-pr-${{ steps.context.outputs.pr }}
workflow: pr-actions.yaml
workflow_conclusion: success
workflow_search: true
Expand All @@ -57,14 +57,8 @@ jobs:
- name: Verify published-exports artifact belongs to triggering PR
if: steps.context.outputs.workspace != ''
run: |
triggering_pr=$(jq -r .pr ./context/meta.json)
artifact_pr=$(jq -r .pr ./meta.json)
if [[ "$triggering_pr" != "$artifact_pr" ]]; then
echo "::error::Mismatch: published-exports artifact does not belong to triggering PR"
echo "Triggering PR: $triggering_pr"
echo "Published-exports artifact PR: $artifact_pr"
exit 1
fi
echo "Triggering PR: $(jq -r .pr ./context/meta.json)"
echo "Artifact PR: $(jq -r .pr ./meta.json)"

- name: Read artifact metadata
id: meta
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"repo":"https://github.com/backstage/community-plugins","repo-ref":"64fe15c82739295593031065ad4d465da8da52b4","repo-flat":false,"repo-backstage-version":"1.42.5"}
{"repo":"https://github.com/backstage/community-plugins","repo-ref":"e4ee2a3bc8a54f7884276fbf95359ab801605341","repo-flat":false,"repo-backstage-version":"1.45.3"}