Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ jobs:
- name: Install website dependencies
run: npm ci --prefix website

- name: Regenerate release manifest for verification
run: npm run build:release-manifest

- name: Verify inherited product baseline
run: npm run check
28 changes: 21 additions & 7 deletions .github/workflows/refresh-release-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@ name: Refresh release manifest

on:
workflow_dispatch:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
actions: write
contents: write
pull-requests: read

concurrency:
group: release-manifest-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
refresh:
if: github.ref_name != github.event.repository.default_branch
if: >-
(github.event_name == 'workflow_dispatch' && github.ref_name != github.event.repository.default_branch) ||
(github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name == github.repository &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association))
runs-on: ubuntu-latest
timeout-minutes: 25
env:
TARGET_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref_name }}
steps:
- name: Check out the selected branch
- name: Check out the target branch
uses: actions/checkout@v7
with:
ref: ${{ github.ref_name }}
ref: ${{ env.TARGET_REF }}
fetch-depth: 0

- name: Set up pinned Node.js and npm
Expand Down Expand Up @@ -59,21 +72,22 @@ jobs:
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add reports/release-manifest-v1.json
git commit -m "Refresh release manifest from exact branch bytes"
git push origin "HEAD:${GITHUB_REF_NAME}"
git push origin "HEAD:${TARGET_REF}"
echo "changed=true" >> "$GITHUB_OUTPUT"

- name: Dispatch Baseline Verification on the updated branch
if: steps.commit.outputs.changed != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run baseline.yml --ref "${GITHUB_REF_NAME}"
run: gh workflow run baseline.yml --ref "${TARGET_REF}"

- name: Summarize
run: |
{
echo "## Release manifest refreshed"
echo
echo "- Branch: ${GITHUB_REF_NAME}"
echo "- Branch: ${TARGET_REF}"
echo "- Report changed: ${{ steps.commit.outputs.changed }}"
echo "- Full check: passed"
echo "- Baseline Verification: dispatched"
echo "- Baseline Verification: ${{ steps.commit.outputs.changed == 'true' && 'will run from the pushed commit' || 'dispatched' }}"
} >> "$GITHUB_STEP_SUMMARY"