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
2 changes: 1 addition & 1 deletion .github/workflows/changelog-entry-required.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
with:
fetch-depth: 0
# Read-only job (git show/diff on already-fetched history, no push);
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # pinned from v6.4.0
with:
node-version: "20"
node-version: "24"

- name: Cache docs node_modules
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # pinned from v5.0.5
with:
path: docs/node_modules
key: ${{ runner.os }}-docs-node-modules-${{ hashFiles('docs/package.json') }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci-pythinker-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python 3.14
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.14"
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand All @@ -65,17 +65,17 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand Down Expand Up @@ -125,29 +125,29 @@ jobs:
continue-on-error: ${{ matrix.experimental == true }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Install GNU Make (Windows)
if: runner.os == 'Windows'
run: choco install make -y

- name: Set up Python 3.13
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.13"

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
cache-dependency-glob: uv.lock

- name: Set up Node.js (web build)
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # pinned from v6.4.0
with:
node-version: "20"
node-version: "24"
cache: "npm"
cache-dependency-path: web/package-lock.json

Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
# collide on the artifact name. The probe only needs the build to
# succeed; we do not consume its binary.
if: success() && !matrix.experimental
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7.0.1
with:
name: pythinker-${{ matrix.target }}
path: ${{ matrix.binary_path }}
Expand All @@ -202,12 +202,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
with:
fetch-depth: 0

- name: Set up Python 3.14
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.14"
allow-prereleases: true
Expand Down Expand Up @@ -319,10 +319,10 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # pinned from main

- name: Run nix package
run: nix run .#pythinker-code -- --version && nix run . -- --help
14 changes: 7 additions & 7 deletions .github/workflows/ci-pythinker-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
python-version: ["3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand All @@ -65,16 +65,16 @@ jobs:
FOOTER_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python 3.14
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.14"
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand All @@ -91,7 +91,7 @@ jobs:
-o packages/pythinker-core/docs

- name: Upload docs preview
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7.0.1
with:
name: docs-preview
path: packages/pythinker-core/docs
6 changes: 3 additions & 3 deletions .github/workflows/ci-pythinker-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Install GNU Make (Windows)
if: runner.os == 'Windows'
Expand All @@ -60,13 +60,13 @@ jobs:

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci-pythinker-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
python-version: ["3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand All @@ -65,16 +65,16 @@ jobs:
FOOTER_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Python 3.14
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pinned from v6.2.0
with:
python-version: "3.14"
allow-prereleases: true

- name: Set up uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # pinned from v8.1.0
with:
version: "0.8.5"
enable-cache: true
Expand All @@ -91,7 +91,7 @@ jobs:
-o sdks/pythinker-sdk/docs

- name: Upload docs preview
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7.0.1
with:
name: docs-preview
path: sdks/pythinker-sdk/docs
49 changes: 42 additions & 7 deletions .github/workflows/dispatch-pythinker-home-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,48 @@ jobs:
# ~1h TTL, minted fresh each run, scoped to the single private site repo.
- name: Mint GitHub App token for pythinker-home
id: app-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2
with:
app-id: ${{ secrets.PYTHINKER_RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.PYTHINKER_RELEASE_BOT_APP_PRIVATE_KEY }}
owner: ${{ env.DISPATCH_OWNER }}
repositories: ${{ env.DISPATCH_REPO }}
permission-contents: write
env:
APP_ID: ${{ secrets.PYTHINKER_RELEASE_BOT_APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.PYTHINKER_RELEASE_BOT_APP_PRIVATE_KEY }}
DISPATCH_OWNER: ${{ env.DISPATCH_OWNER }}
DISPATCH_REPO: ${{ env.DISPATCH_REPO }}
run: |
set -euo pipefail
if [ -z "${APP_ID:-}" ] || [ -z "${APP_PRIVATE_KEY:-}" ]; then
echo "::error::Missing PYTHINKER_RELEASE_BOT_APP_ID or PYTHINKER_RELEASE_BOT_APP_PRIVATE_KEY. Configure the org-owned pythinker-release-bot App and install it on ${DISPATCH_OWNER}/${DISPATCH_REPO} with Contents: Read and write." >&2
exit 1
fi

b64url() { openssl base64 -A | tr '+/' '-_' | tr -d '='; }
key_file=$(mktemp)
trap 'rm -f "$key_file"' EXIT
printf '%s\n' "$APP_PRIVATE_KEY" > "$key_file"
chmod 600 "$key_file"

now=$(date +%s)
header=$(printf '{"alg":"RS256","typ":"JWT"}' | b64url)
payload=$(jq -nc --argjson iat "$((now - 60))" --argjson exp "$((now + 540))" --arg iss "$APP_ID" '{iat:$iat,exp:$exp,iss:$iss}' | b64url)
unsigned="${header}.${payload}"
signature=$(printf '%s' "$unsigned" | openssl dgst -sha256 -sign "$key_file" | b64url)
jwt="${unsigned}.${signature}"

installation_id=$(curl --fail-with-body -sS \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${jwt}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/installation" \
| jq -er '.id')
token=$(jq -nc --arg repo "$DISPATCH_REPO" '{repositories:[$repo],permissions:{contents:"write"}}' \
| curl --fail-with-body -sS \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${jwt}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/app/installations/${installation_id}/access_tokens" \
-d @- \
| jq -er '.token')
echo "::add-mask::$token"
echo "token=$token" >> "$GITHUB_OUTPUT"

- name: Trigger pythinker-home sync
env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # pinned from v6.4.0
with:
node-version: "20"
node-version: "24"

- name: Cache docs node_modules
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # pinned from v5.0.5
with:
path: docs/node_modules
key: ${{ runner.os }}-docs-node-modules-${{ hashFiles('docs/package.json') }}
Expand All @@ -41,7 +41,7 @@ jobs:

- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # pinned from v6.0.0
with:
enablement: true

Expand Down Expand Up @@ -72,10 +72,10 @@ jobs:
run: touch docs/.vitepress/dist/.nojekyll

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # pinned from v5.0.0
with:
path: docs/.vitepress/dist

- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # pinned from v5.0.0
Loading
Loading