Hash-pin every external reference in deploy.yml (closes #7) #17
@@ -3,28 +3,36 @@ name: Build and Deploy to Cloudflare Pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- feat/initial-site
|
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: klakegg/hugo:ext-alpine
|
# Same digest the Dockerfile pins: one pinned base image and one
|
||||||
|
# dependency list (script/bootstrap) for both the check build and
|
||||||
|
# the deploy build.
|
||||||
|
# alpine 3.21, 2026-02-28
|
||||||
|
image: alpine@sha256:c3f8e73fdb79deaebaa2037150150191b9dcbfba68b4a46d70103204c53f4709
|
||||||
steps:
|
steps:
|
||||||
|
# actions/checkout v4.2.2, 2026-08-09
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: script/bootstrap
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
run: hugo --minify
|
run: script/test
|
||||||
|
|
||||||
- name: Archive site
|
- name: Archive site
|
||||||
run: tar -czf site.tar.gz public
|
run: tar -czf site.tar.gz public
|
||||||
|
|
||||||
|
# actions/upload-artifact v4.6.2, 2026-08-09
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: site
|
name: site
|
||||||
path: site.tar.gz
|
path: site.tar.gz
|
||||||
@@ -33,18 +41,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
container:
|
container:
|
||||||
image: node:20
|
# node 20.20.2-bookworm, 2026-08-09
|
||||||
|
image: node@sha256:8f693eaa7e0a8e71560c9a82b55fd54c2ae920a2ba5d2cde28bac7d1c01c9ba5
|
||||||
steps:
|
steps:
|
||||||
|
# actions/download-artifact v4.3.0, 2026-08-09
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
with:
|
with:
|
||||||
name: site
|
name: site
|
||||||
|
|
||||||
- name: Extract site
|
- name: Extract site
|
||||||
run: tar -xzf site.tar.gz
|
run: tar -xzf site.tar.gz
|
||||||
|
|
||||||
|
# wrangler 4.120.0, 2026-08-09
|
||||||
- name: Install Wrangler
|
- name: Install Wrangler
|
||||||
run: npm install -g wrangler
|
run: npm install -g wrangler@4.120.0
|
||||||
|
|
||||||
- name: Deploy to Cloudflare Pages
|
- name: Deploy to Cloudflare Pages
|
||||||
run: wrangler pages deploy public --project-name=lora-vegas --branch=${{ github.ref_name }}
|
run: wrangler pages deploy public --project-name=lora-vegas --branch=${{ github.ref_name }}
|
||||||
|
|||||||
15
TODO.md
15
TODO.md
@@ -14,7 +14,8 @@ pre-1.0
|
|||||||
|
|
||||||
No git tags. The site is live and now has the scripts-to-rule-them-all scaffold
|
No git tags. The site is live and now has the scripts-to-rule-them-all scaffold
|
||||||
(`Makefile`, `script/`, `Dockerfile`, `check.yml`); still missing `LICENSE` and
|
(`Makefile`, `script/`, `Dockerfile`, `check.yml`); still missing `LICENSE` and
|
||||||
policy files.
|
policy files. Every external reference in the repo is now pinned by
|
||||||
|
cryptographic hash (or, for the wrangler CLI install, an exact version).
|
||||||
|
|
||||||
# Next Step
|
# Next Step
|
||||||
|
|
||||||
@@ -24,6 +25,15 @@ Update `README.md` accordingly.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
|
- 2026-08-09: hash-pinned every external reference in
|
||||||
|
`.gitea/workflows/deploy.yml` (closes #7): both job container images are
|
||||||
|
pinned by digest, all three `uses:` are pinned by 40-hex commit SHA
|
||||||
|
(`upload`/`download-artifact` moved v3 to v4), and the wrangler install is
|
||||||
|
pinned to an exact version. The abandoned `klakegg/hugo:ext-alpine` image is
|
||||||
|
gone: the build job now runs on the same pinned `alpine` digest the
|
||||||
|
`Dockerfile` uses, with `script/bootstrap` then `script/test`. Also dropped
|
||||||
|
the dead `feat/initial-site` push trigger and reindented the file to 4-space
|
||||||
|
YAML to match `check.yml`
|
||||||
- 2026-07-25: added the scripts-to-rule-them-all scaffold (closes #4): `script/`
|
- 2026-07-25: added the scripts-to-rule-them-all scaffold (closes #4): `script/`
|
||||||
entrypoints, `Makefile` shims, a Hugo `Dockerfile` (sha256-pinned alpine) plus
|
entrypoints, `Makefile` shims, a Hugo `Dockerfile` (sha256-pinned alpine) plus
|
||||||
`.dockerignore` that runs `make check`, `.gitea/workflows/check.yml` running
|
`.dockerignore` that runs `make check`, `.gitea/workflows/check.yml` running
|
||||||
@@ -40,9 +50,6 @@ Update `README.md` accordingly.
|
|||||||
|
|
||||||
# Future Steps
|
# Future Steps
|
||||||
|
|
||||||
- Pin the images and actions in `deploy.yml` by sha256
|
|
||||||
(`klakegg/hugo:ext-alpine`, `node:20`, `actions/checkout`,
|
|
||||||
`upload`/`download-artifact` are all unpinned)
|
|
||||||
- Rework README.md into the standard sections: Description, Getting Started,
|
- Rework README.md into the standard sections: Description, Getting Started,
|
||||||
Rationale, Design, TODO, License, Author (currently About, Contributing,
|
Rationale, Design, TODO, License, Author (currently About, Contributing,
|
||||||
Technical Details, License)
|
Technical Details, License)
|
||||||
|
|||||||
Reference in New Issue
Block a user