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.
91 lines
3.1 KiB
YAML
91 lines
3.1 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, edited, synchronize, reopened]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
labeler:
|
|
permissions:
|
|
pull-requests: write
|
|
name: Label PR
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: srvaroa/labeler@9c29ad1ef33d169f9ef33c52722faf47a566bcf3 # v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
commitlint:
|
|
permissions:
|
|
pull-requests: write
|
|
name: Verify PR title / description conforms to semantic-release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
|
with:
|
|
version: 11.1.1
|
|
# These rules are disabled because Github will always ensure there
|
|
# is a blank line between the title and the body and Github will
|
|
# word wrap the description field to ensure a reasonable max line
|
|
# length.
|
|
- run: >
|
|
echo 'module.exports = {
|
|
"rules": {
|
|
"body-max-line-length": [0, "always", Infinity],
|
|
"footer-max-line-length": [0, "always", Infinity],
|
|
"body-leading-blank": [0, "always"]
|
|
}
|
|
}' > .commitlintrc.js
|
|
- run: >
|
|
pnpm dlx
|
|
--package @commitlint/cli@21.2.2
|
|
--package @commitlint/config-conventional@21.2.2
|
|
commitlint --extends @commitlint/config-conventional --verbose <<< $COMMIT_MSG
|
|
env:
|
|
COMMIT_MSG: >
|
|
${{ github.event.pull_request.title }}
|
|
|
|
${{ github.event.pull_request.body }}
|
|
- if: failure()
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const message = `**ACTION NEEDED**
|
|
|
|
Lance follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for release automation.
|
|
|
|
The PR title and description are used as the merge commit message.\
|
|
Please update your PR title and description to match the specification.
|
|
|
|
For details on the error please inspect the "PR Title Check" action.
|
|
`
|
|
// Get list of current comments
|
|
const comments = await github.paginate(github.rest.issues.listComments, {
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number
|
|
});
|
|
// Check if this job already commented
|
|
for (const comment of comments) {
|
|
if (comment.body === message) {
|
|
return // Already commented
|
|
}
|
|
}
|
|
// Post the comment about Conventional Commits
|
|
github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
body: message
|
|
})
|
|
core.setFailed(message)
|