Skip to content

Commit 06fe2d0

Browse files
Merge branch 'main' into chore/security-fix-jsonwebtoken
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
2 parents 3b4b627 + 6e01d07 commit 06fe2d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1982
-911
lines changed

.github/workflows/boj-build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
12
name: BoJ Server Build Trigger
2-
33
on:
44
push:
5-
branches: [ main, master ]
5+
branches: [main, master]
66
workflow_dispatch:
7-
87
jobs:
98
trigger-boj:
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Checkout
13-
uses: actions/checkout@v4
14-
12+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1513
- name: Trigger BoJ Server (Casket/ssg-mcp)
1614
run: |
1715
# Send a secure trigger to boj-server to build this repository
1816
curl -X POST "http://boj-server.local:7700/cartridges/ssg-mcp/invoke" -H "Content-Type: application/json" -d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"engine\": \"casket\\"}"}
1917
continue-on-error: true
18+
permissions:
19+
contents: read

.github/workflows/casket-pages.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: GitHub Pages
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
24+
25+
- name: Checkout casket-ssg
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
27+
with:
28+
repository: hyperpolymath/casket-ssg
29+
path: .casket-ssg
30+
31+
- name: Setup GHCup
32+
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
33+
with:
34+
ghc-version: '9.8.2'
35+
cabal-version: '3.10'
36+
37+
- name: Cache Cabal
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
39+
with:
40+
path: |
41+
~/.cabal/packages
42+
~/.cabal/store
43+
.casket-ssg/dist-newstyle
44+
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
45+
46+
- name: Build casket-ssg
47+
working-directory: .casket-ssg
48+
run: cabal build
49+
50+
- name: Prepare site source
51+
shell: bash
52+
run: |
53+
set -euo pipefail
54+
rm -rf .site-src _site
55+
56+
if [ -d site ]; then
57+
cp -R site .site-src
58+
else
59+
mkdir -p .site-src
60+
TODAY="$(date +%Y-%m-%d)"
61+
REPO_NAME="${{ github.event.repository.name }}"
62+
REPO_URL="https://github.com/${{ github.repository }}"
63+
README_URL=""
64+
65+
if [ -f README.md ]; then
66+
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.md"
67+
elif [ -f README.adoc ]; then
68+
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.adoc"
69+
fi
70+
71+
{
72+
echo "---"
73+
echo "title: ${REPO_NAME}"
74+
echo "date: ${TODAY}"
75+
echo "---"
76+
echo
77+
echo "# ${REPO_NAME}"
78+
echo
79+
echo "Static documentation site for ${REPO_NAME}."
80+
echo
81+
echo "- Source repository: [${{ github.repository }}](${REPO_URL})"
82+
if [ -n "${README_URL}" ]; then
83+
echo "- README: [project README](${README_URL})"
84+
fi
85+
if [ -d docs ]; then
86+
echo "- Docs directory: [docs/](${REPO_URL}/tree/${{ github.ref_name }}/docs)"
87+
fi
88+
echo
89+
echo "Project-specific site content can be added later under site/."
90+
} > .site-src/index.md
91+
fi
92+
93+
- name: Build site
94+
run: |
95+
mkdir -p _site
96+
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
97+
touch ../_site/.nojekyll
98+
99+
- name: Setup Pages
100+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
101+
102+
- name: Upload artifact
103+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
104+
with:
105+
path: '_site'
106+
107+
deploy:
108+
environment:
109+
name: github-pages
110+
url: ${{ steps.deployment.outputs.page_url }}
111+
runs-on: ubuntu-latest
112+
needs: build
113+
steps:
114+
- name: Deploy to GitHub Pages
115+
id: deployment
116+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/codeql.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
# the `language` matrix defined below to confirm you have the correct set of
1111
# supported CodeQL languages.
1212
#
13-
permissions: read-all
13+
permissions:
14+
contents: read
1415

1516
name: "CodeQL Advanced"
1617

.github/workflows/container-policy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
permissions: read-all
2+
permissions:
3+
contents: read
34

45
name: Container Policy
56
on: [push, pull_request]

.github/workflows/guix-nix-policy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
permissions: read-all
2+
permissions:
3+
contents: read
34

45
name: Guix/Nix Package Policy
56
on: [push, pull_request]

.github/workflows/hypatia-scan.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
- cron: '0 0 * * 0' # Weekly on Sunday
1212
workflow_dispatch:
1313

14-
permissions: read-all
14+
permissions:
15+
contents: read
1516

1617
jobs:
1718
scan:

.github/workflows/mirror.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
branches: [main]
88
workflow_dispatch:
99

10-
permissions: read-all
10+
permissions:
11+
contents: read
1112

1213
jobs:
1314
mirror-gitlab:

.github/workflows/npm-bun-blocker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name: NPM/Bun Blocker
33
on: [push, pull_request]
44

5-
permissions: read-all
5+
permissions:
6+
contents: read
67

78
jobs:
89
check:

.github/workflows/quality.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
permissions: read-all
2+
permissions:
3+
contents: read
34

45
name: Code Quality
56
on: [push, pull_request]

.github/workflows/rsr-antipattern.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# Enforces: No TypeScript, No Go, No Python (except SaltStack), No npm
66
# Allows: ReScript, Deno, WASM, Rust, OCaml, Haskell, Guile/Scheme
77

8-
permissions: read-all
8+
permissions:
9+
contents: read
910

1011
name: RSR Anti-Pattern Check
1112

0 commit comments

Comments
 (0)