-
Notifications
You must be signed in to change notification settings - Fork 0
Adopt the Hub's Reusable validate-task.yml #99
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
+104
−130
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cef5257
Adopt the Hub's Reusable validate-task.yml
ptr727 51d01f2
Pin the Deepen-Checkout Step to github.sha
ptr727 edc3d69
Exclude the Vendored Theme from the Repo-Gate sha-pin Scan
ptr727 41d46f7
Fix Stale Trigger Comment in test-pull-request.yml
ptr727 1c9d3f9
Fix Overclaiming Exclusion Comment
ptr727 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Blog's own validate hook, run by the hub's validate-task.yml validate job. | ||
| # The fleet doc-lint block and the generic unit-test job in validate-task.yml do not cover this repo's own domain checks. | ||
| name: Validate repository (Blog) | ||
| description: Config/env-docs checks and the Hugo build/URL-parity gate. | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
|
|
||
| - name: Validate config step | ||
| shell: bash | ||
| run: | | ||
| set -Eeuo pipefail | ||
| for f in spec/*.json version.json .editorconfig-checker.json; do | ||
| jq empty "$f" | ||
| done | ||
| python3 -c 'import yaml,sys; yaml.safe_load(open("hugo.yaml"))' | ||
|
|
||
| # Every configuration value is described once, in ENVIRONMENT.md. | ||
| # A new value gets added wherever its author is working, and nothing else notices a missing row. | ||
| # This check runs both directions: undocumented values, and rows describing nothing. | ||
| - name: Check environment docs step | ||
| shell: bash | ||
| run: python3 checks/check-env-docs.py | ||
|
|
||
| # The hub's validate job checkout is shallow. | ||
| # The mtime restore below needs full history to date each file from its last commit. | ||
| # This hook deepens the checkout before the build. | ||
| - name: Deepen checkout step | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| fetch-depth: 0 | ||
|
|
||
| # The pin lives in the action, so validation and the deploy cannot install different generators. | ||
| - name: Install Hugo step | ||
| uses: ./.github/actions/install-hugo | ||
|
|
||
| # The same action the deploy uses, so the two agree on who restores the mtimes. | ||
| - name: Restore file mtimes step | ||
| uses: chetan/git-restore-mtime-action@d186aca54f8760da4dec55313195e51ed3ebb0b3 # v2.3 | ||
| with: | ||
| args: static | ||
|
|
||
| # This is the build and URL-contract gate, not an extra step beside one. | ||
| # The script runs `hugo --panicOnWarning` and check-url-parity itself, so a separate build would repeat both. | ||
| # --panicOnWarning is the real gate, and two PaperMod templates are overridden in layouts/ so it can stay on. | ||
| # Every local asset reference must resolve, and every legacy image URL from the WordPress import must too. | ||
| # | ||
| # Running the script here is also the point: it was linted and never run, so a broken caller contract reached a deploy. | ||
| # An empty scratch root exercises the deploy's path short of the transport, with no previous release for the hard-link guard. | ||
| # REQUIRE_BROTLI stays unset, since installing brotli would cost an apt round trip per pull request. | ||
| - name: Assemble release bundle step | ||
| shell: bash | ||
| env: | ||
| MTIME_RESTORED: '1' | ||
| run: | | ||
| set -Eeuo pipefail | ||
| deploy/make-release.sh "${RUNNER_TEMP}/validate-bundle" "$(date -u +%Y%m%d-%H%M%S)" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.