mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
Pin every remaining third-party action reference in `.github/` to a full 40-character commit SHA, with the intended version in a trailing comment (`uses: owner/action@<sha> # vX.Y.Z`), following the pins already in `cli.yml`, `typos.yml` and `make-release-commit.yml`. Fixes #3293. 53 references across 13 files change, covering 16 actions, including the branch refs called out in the issue (`dtolnay/rust-toolchain@master`, `@stable`) and `pypa/gh-action-pypi-publish@release/v1`. Each SHA is the commit its current tag or branch resolves to today, so the code that runs is unchanged. Comments name the most specific tag on that commit (for example `v2.9.3` for `Swatinem/rust-cache@v2`); where no such tag exists, they keep the original ref (`v1` for `srvaroa/labeler` and `rui314/setup-mold`, `v3` for `addnab/docker-run-action`, `stable`/`master` for `dtolnay/rust-toolchain`). The `stable` branch of `dtolnay/rust-toolchain` defaults its `toolchain` input to `stable`, so pinning its SHA keeps the `nodejs.yml` step that passes no toolchain on stable. GitHub-maintained `actions/*` references are left on their tags, as in the existing pins. Keeping SHAs current through Dependabot is the sibling issue and is not part of this change. Validation: - No third-party `uses:` reference in `.github/` is left without a 40-character SHA (53 before, 0 after). - For all 23 distinct third-party pins in `.github/`, `git ls-remote` against the upstream repository confirms the SHA is the commit that the commented tag or branch points to. A deliberately altered SHA and a reverted tag ref were both caught. - `pre-commit run` on the changed files passes (check-yaml, end-of-file, trailing whitespace, typos). - actionlint 1.7.12 reports the same 35 findings on `main` and on this branch, all of them existing ones (custom runner labels and composite actions under `workflows/`). It reports none for this change.
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
name: Deploy docs to Pages
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow one concurrent deployment
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# This reduces the disk space needed for the build
|
|
RUSTFLAGS: "-C debuginfo=0"
|
|
# according to: https://matklad.github.io/2021/09/04/fast-rust-builds.html
|
|
# CI builds are faster with incremental disabled.
|
|
CARGO_INCREMENTAL: "0"
|
|
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
|
|
|
jobs:
|
|
# Single deploy job since we're just deploying
|
|
build:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Install dependencies needed for ubuntu
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
rustup update && rustup default
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
cache: "pip"
|
|
cache-dependency-path: "docs/requirements.txt"
|
|
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
- name: Build Python
|
|
working-directory: python
|
|
run: |
|
|
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .
|
|
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -r ../docs/requirements.txt
|
|
- name: Set up node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
- name: Install node dependencies
|
|
working-directory: nodejs
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
- name: Build docs
|
|
working-directory: docs
|
|
run: |
|
|
PYTHONPATH=. mkdocs build
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: "docs/site"
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|