Skip to content

Assembler match: update preview workflow to use new outputs #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
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
12 changes: 7 additions & 5 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ jobs:
runs-on: ubuntu-latest
outputs:
content-source-match: ${{ steps.event-check.outputs.content-source-match != '' && steps.event-check.outputs.content-source-match || steps.match.outputs.content-source-match }}
content-source-name: ${{ steps.event-check.outputs.content-source-name != '' && steps.event-check.outputs.content-source-name || steps.match.outputs.content-source-name }}
content-source-next: ${{ steps.event-check.outputs.content-source-next != '' && steps.event-check.outputs.content-source-next || steps.match.outputs.content-source-next }}
content-source-current: ${{ steps.event-check.outputs.content-source-current != '' && steps.event-check.outputs.content-source-current || steps.match.outputs.content-source-current }}
steps:
- name: Not a push event
id: event-check
if: contains(fromJSON('["merge_group", "pull_request", "pull_request_target"]'), github.event_name)
# ensure we emit static output to simplify our checks in the build step
# ensure we emit static output to simplify our checks in the build step, next/current output has no barrings during preview builds
run: |
echo "content-source-match=true" >> $GITHUB_OUTPUT
echo "content-source-name=next" >> $GITHUB_OUTPUT
echo "content-source-next=true" >> $GITHUB_OUTPUT
echo "content-source-current=true" >> $GITHUB_OUTPUT
- name: Match for push events
id: match
if: contains(fromJSON('["push"]'), github.event_name)
Expand All @@ -76,11 +78,11 @@ jobs:
ref_name: ${{ github.ref_name }}
repository: ${{ github.repository }}
- name: Debug
if: contains(fromJSON('["merge_group", "pull_request", "pull_request_target"]'), github.event_name)
run: |
echo "Non sensitive data, echo'ing here temporarily to validate this job before connecting it further into the build job"
echo "content-source-match=${{ steps.event-check.outputs.content-source-match != '' && steps.event-check.outputs.content-source-match || steps.match.outputs.content-source-match }}"
echo "content-source-name=${{ steps.event-check.outputs.content-source-name != '' && steps.event-check.outputs.content-source-name || steps.match.outputs.content-source-name }}"
echo "content-source-name=${{ steps.event-check.outputs.content-source-next != '' && steps.event-check.outputs.content-source-next || steps.match.outputs.content-source-next }}"
echo "content-source-current=${{ steps.event-check.outputs.content-source-current != '' && steps.event-check.outputs.content-source-current || steps.match.outputs.content-source-current }}"
echo "ref=${{ github.ref_name }}"
echo "repo=${{ github.repository }}"

Expand Down
Loading