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
48 changes: 48 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/ci_check.yml':
- 'actions/checkout@v7.0.1'
- 'actions/setup-node@v7.1.0'
- 'actions/upload-artifact@v7.0.2'
'.github/workflows/npm_release.yml':
- 'actions/checkout@v7.0.1'
- 'actions/download-artifact@v8.0.2'
- 'actions/setup-node@v7.1.0'
'.github/workflows/storybook_pages.yml':
- 'actions/checkout@v7.0.1'
- 'actions/deploy-pages@v4.0.5'
- 'actions/upload-artifact@v4.6.2'
dependencies:
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/deploy-pages@v4.0.5':
ref: 'v4.0.5'
commit: 'sha1-d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e'
owner_id: 44036562
repo_id: 438112499
'actions/download-artifact@v8.0.2':
ref: 'v8.0.2'
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
owner_id: 44036562
repo_id: 192626254
'actions/setup-node@v7.1.0':
ref: 'v7.1.0'
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
owner_id: 44036562
repo_id: 189476904
'actions/upload-artifact@v4.6.2':
ref: 'v4.6.2'
commit: 'sha1-ea165f8d65b6e75b540449e92b4886f43607fa02'
owner_id: 44036562
repo_id: 192625955
'actions/upload-artifact@v7.0.2':
ref: 'v7.0.2'
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
owner_id: 44036562
repo_id: 192625955
10 changes: 5 additions & 5 deletions .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
# The catalog has its own phase deadlines; this job also verifies packages and SSR.
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Validate the catalog and bind packed consumers to the checked commit
shell: bash
env:
HA_UI_PACKED_EXPECTED_REVISION: ${{ github.sha }}
run: bash .github/scripts/verify-catalog.sh
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- uses: actions/setup-node@v7.1.0
with:
node-version-file: .node-version
package-manager-cache: false
# Read the original catalog SDK at the reviewed revision; never rewrite it.
- name: Read the original specification SDK
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v7.0.1
with:
repository: vypdev/copilot
ref: 3e7ceea08e6131360e026937d1c0cc1b120472e0
Expand All @@ -48,7 +48,7 @@ jobs:
node -e "require('./.validation/copilot-sdk/src/infrastructure/specification_catalog_validator.cjs').main([], process.cwd())"
- name: Retain source coverage and compiled package evidence
if: ${{ always() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
uses: actions/upload-artifact@v7.0.2
with:
name: shared-ui-validation-${{ github.sha }}
path: |
Expand All @@ -62,7 +62,7 @@ jobs:
retention-days: 7
- name: Retain the verified npm candidate for the production SHA
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
uses: actions/upload-artifact@v7.0.2
with:
name: npm-candidate-${{ github.sha }}
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Comment thread
vypbot marked this conversation as resolved.
Resolved
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
ref: ${{ github.sha }}
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.0.1
- uses: actions/setup-node@v7.1.0
with:
node-version-file: .node-version
registry-url: https://registry.npmjs.org
package-manager-cache: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
- uses: actions/download-artifact@v8.0.2
with:
name: npm-candidate-${{ github.sha }}
path: ${{ runner.temp }}/ha-ui-npm-candidate
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/storybook_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
# The published catalog runs the same browser gates as CI.
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Build and verify Storybook in Linux
shell: bash
run: bash .github/scripts/verify-catalog.sh
- name: Upload the verified Pages archive
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@v4.6.2
with:
name: github-pages
path: build/artifact.tar
Expand All @@ -47,4 +47,4 @@ jobs:
steps:
- name: Publish the verified static catalog
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
uses: actions/deploy-pages@v4.0.5
3 changes: 3 additions & 0 deletions docs/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ workflow builds and rechecks trusted `master`, then creates the Pages archive in
Only its deployment job receives Pages write and OIDC permission.

Fork workflows require maintainer approval in GitHub.
The CI, Pages and npm workflows reference complete action release versions.
GitHub runs the commits recorded in `.github/workflows/actions.lock`. Regenerate the lockfile with
`gh actions-lock` and the changed workflow paths when updating action versions.
CI and the Pages build use Apple Silicon runners in the organization's `vypdev` group.
Each runs the Linux build in a job-specific Docker container and keeps the
runner's Docker credentials outside the container. The Pages deployment job uses
Expand Down
19 changes: 16 additions & 3 deletions tests/architecture.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,22 @@ test('Pages builds only the trusted default branch and grants write permissions
expect(deploy.environment.name).toBe('github-pages');expect(workflow.concurrency['cancel-in-progress']).toBe(false);
});

test('publication preparation uses organization runners and OIDC jobs use GitHub runners', () => {
const pages = parse(readFileSync('.github/workflows/storybook_pages.yml', 'utf8'));
const npm = parse(readFileSync('.github/workflows/npm_release.yml', 'utf8'));
test('workflows name exact action releases and use GitHub runners for OIDC publication', () => {
const ciPath = '.github/workflows/ci_check.yml';
const pagesPath = '.github/workflows/storybook_pages.yml';
const npmPath = '.github/workflows/npm_release.yml';
const ci = parse(readFileSync(ciPath, 'utf8'));
const pages = parse(readFileSync(pagesPath, 'utf8'));
const npm = parse(readFileSync(npmPath, 'utf8'));
const lock = parse(readFileSync('.github/workflows/actions.lock', 'utf8'));
for (const [path, workflow] of [[ciPath, ci], [pagesPath, pages], [npmPath, npm]]) {
const refs = Object.values(workflow.jobs).flatMap(job => job.steps.map(step => step.uses).filter(Boolean));
expect([...new Set(refs)].sort()).toEqual([...lock.workflows[path]].sort());
for (const ref of refs) {
expect(ref).toMatch(/^[\w/-]+@v[0-9]+\.[0-9]+\.[0-9]+$/u);
expect(lock.dependencies[ref].commit).toMatch(/^sha1-[a-f0-9]{40}$/u);
}
}
expect(pages.jobs.build['runs-on']).toEqual({group: 'vypdev', labels: ['self-hosted', 'macOS', 'ARM64']});
expect(npm.jobs.candidate['runs-on']).toEqual({group: 'vypdev', labels: ['self-hosted', 'codex', 'Linux']});
for (const job of [pages.jobs.build, npm.jobs.candidate]) {
Expand Down
Loading