mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-12 11:21:37 +00:00
Bumps the major group with 1 update in the / directory: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6.0.2 to 7.0.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v7.0.0</h2> <h2>What's Changed</h2> <ul> <li>block checking out fork pr for pull_request_target and workflow_run by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li> <li>Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2458">actions/checkout#2458</a></li> <li>Bump flatted from 3.3.1 to 3.4.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2460">actions/checkout#2460</a></li> <li>Bump js-yaml from 4.1.0 to 4.2.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2461">actions/checkout#2461</a></li> <li>Bump <code>@actions/core</code> and <code>@actions/tool-cache</code> and Remove uuid by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2459">actions/checkout#2459</a></li> <li>upgrade module to esm and update dependencies by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2463">actions/checkout#2463</a></li> <li>Bump the minor-npm-dependencies group across 1 directory with 3 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2462">actions/checkout#2462</a></li> <li>getting ready for checkout v7 release by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2464">actions/checkout#2464</a></li> <li>update error wording by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2467">actions/checkout#2467</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v6.0.3...v7.0.0">https://github.com/actions/checkout/compare/v6.0.3...v7.0.0</a></p> <h2>v6.0.3</h2> <h2>What's Changed</h2> <ul> <li>Update changelog by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2357">actions/checkout#2357</a></li> <li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a href="https://github.com/yaananth"><code>@yaananth</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li> <li>Fix checkout init for SHA-256 repositories by <a href="https://github.com/yaananth"><code>@yaananth</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li> <li>Update changelog for v6.0.3 by <a href="https://github.com/yaananth"><code>@yaananth</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2446">actions/checkout#2446</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/yaananth"><code>@yaananth</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v6...v6.0.3">https://github.com/actions/checkout/compare/v6...v6.0.3</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>v7.0.0</h2> <ul> <li>Block checking out fork PR for pull_request_target and workflow_run by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li> <li>Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2458">actions/checkout#2458</a></li> <li>Bump flatted from 3.3.1 to 3.4.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2460">actions/checkout#2460</a></li> <li>Bump js-yaml from 4.1.0 to 4.2.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2461">actions/checkout#2461</a></li> <li>Bump <code>@actions/core</code> and <code>@actions/tool-cache</code> and Remove uuid by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2459">actions/checkout#2459</a></li> <li>upgrade module to esm and update dependencies by <a href="https://github.com/aiqiaoy"><code>@aiqiaoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2463">actions/checkout#2463</a></li> <li>Bump the minor-npm-dependencies group across 1 directory with 3 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/checkout/pull/2462">actions/checkout#2462</a></li> </ul> <h2>v6.0.3</h2> <ul> <li>Fix checkout init for SHA-256 repositories by <a href="https://github.com/yaananth"><code>@yaananth</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li> <li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a href="https://github.com/yaananth"><code>@yaananth</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li> </ul> <h2>v6.0.2</h2> <ul> <li>Fix tag handling: preserve annotations and explicit fetch-tags by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2356">actions/checkout#2356</a></li> </ul> <h2>v6.0.1</h2> <ul> <li>Add worktree support for persist-credentials includeIf by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2327">actions/checkout#2327</a></li> </ul> <h2>v6.0.0</h2> <ul> <li>Persist creds to a separate file by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li> <li>Update README to include Node.js 24 support details and requirements by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li> </ul> <h2>v5.0.1</h2> <ul> <li>Port v6 cleanup to v5 by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li> </ul> <h2>v5.0.0</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> </ul> <h2>v4.3.1</h2> <ul> <li>Port v6 cleanup to v4 by <a href="https://github.com/ericsciple"><code>@ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li> </ul> <h2>v4.3.0</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <h2>v4.2.2</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <h2>v4.2.1</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="9c091bb21b"><code>9c091bb</code></a> update error wording (<a href="https://redirect.github.com/actions/checkout/issues/2467">#2467</a>)</li> <li><a href="1044a6dea9"><code>1044a6d</code></a> getting ready for checkout v7 release (<a href="https://redirect.github.com/actions/checkout/issues/2464">#2464</a>)</li> <li><a href="f0282184c7"><code>f028218</code></a> Bump the minor-npm-dependencies group across 1 directory with 3 updates (<a href="https://redirect.github.com/actions/checkout/issues/2462">#2462</a>)</li> <li><a href="d914b262ff"><code>d914b26</code></a> upgrade module to esm and update dependencies (<a href="https://redirect.github.com/actions/checkout/issues/2463">#2463</a>)</li> <li><a href="537c7ef99c"><code>537c7ef</code></a> Bump <code>@actions/core</code> and <code>@actions/tool-cache</code> and Remove uuid (<a href="https://redirect.github.com/actions/checkout/issues/2459">#2459</a>)</li> <li><a href="130a169078"><code>130a169</code></a> Bump js-yaml from 4.1.0 to 4.2.0 (<a href="https://redirect.github.com/actions/checkout/issues/2461">#2461</a>)</li> <li><a href="7d09575332"><code>7d09575</code></a> Bump flatted from 3.3.1 to 3.4.2 (<a href="https://redirect.github.com/actions/checkout/issues/2460">#2460</a>)</li> <li><a href="0f9f3aa320"><code>0f9f3aa</code></a> Bump actions/publish-immutable-action (<a href="https://redirect.github.com/actions/checkout/issues/2458">#2458</a>)</li> <li><a href="f9e715a95f"><code>f9e715a</code></a> block checking out fork pr for pull_request_target and workflow_run (<a href="https://redirect.github.com/actions/checkout/issues/2454">#2454</a>)</li> <li><a href="df4cb1c069"><code>df4cb1c</code></a> Update changelog for v6.0.3 (<a href="https://redirect.github.com/actions/checkout/issues/2446">#2446</a>)</li> <li>Additional commits viewable in <a href="de0fac2e45...9c091bb21b">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
206 lines
8.8 KiB
YAML
206 lines
8.8 KiB
YAML
# Monthly bump of the uv pin in `.github/actions/uv_setup/action.yml`.
|
|
#
|
|
# We pin uv (rather than letting setup-uv resolve latest) because
|
|
# `releases.astral.sh` lags GitHub Releases on new uv versions, causing CI
|
|
# to flap on fresh-release days. This workflow keeps the pin fresh without
|
|
# exposing that race.
|
|
#
|
|
# Dependabot's `github-actions` ecosystem only updates `uses:` SHA pins, not
|
|
# the `UV_VERSION` env value the action passes to `astral-sh/setup-uv`, so we
|
|
# open the PR ourselves. Idempotent: if a PR for the target version already
|
|
# exists, the workflow exits without creating a duplicate.
|
|
|
|
name: "Bump uv pin"
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 9 1 * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: bump-uv-pin
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
bump:
|
|
if: github.repository_owner == 'langchain-ai'
|
|
name: "Open PR if uv has a newer release"
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Resolve current and latest uv versions
|
|
id: versions
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
set -euo pipefail
|
|
action_file=".github/actions/uv_setup/action.yml"
|
|
current=$(grep -oE 'UV_VERSION: "[0-9]+\.[0-9]+\.[0-9]+"' "$action_file" \
|
|
| sed -E 's/UV_VERSION: "([^"]+)"/\1/' | head -n1)
|
|
latest=$(gh api repos/astral-sh/uv/releases/latest --jq .tag_name)
|
|
semver='^[0-9]+\.[0-9]+\.[0-9]+$'
|
|
if [[ ! "$current" =~ $semver ]]; then
|
|
echo "::error::Could not parse current uv pin from $action_file (got '$current')"
|
|
exit 1
|
|
fi
|
|
if [[ ! "$latest" =~ $semver ]]; then
|
|
echo "::error::Unexpected uv tag from GitHub API (got '$latest')"
|
|
exit 1
|
|
fi
|
|
echo "current=$current" >> "$GITHUB_OUTPUT"
|
|
echo "latest=$latest" >> "$GITHUB_OUTPUT"
|
|
echo "branch=chore/bump-uv-$latest" >> "$GITHUB_OUTPUT"
|
|
echo "Current pin: $current"
|
|
echo "Latest uv: $latest"
|
|
|
|
- name: Log if already up to date
|
|
# The actual skip is implemented by the `if:` guards on every
|
|
# subsequent step; this step only emits a log line so the run
|
|
# history shows why no PR was opened.
|
|
if: steps.versions.outputs.current == steps.versions.outputs.latest
|
|
run: echo "uv pin already at ${{ steps.versions.outputs.latest }}; nothing to do."
|
|
|
|
- name: Skip if PR already open for this version
|
|
id: existing
|
|
if: steps.versions.outputs.current != steps.versions.outputs.latest
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
BRANCH: ${{ steps.versions.outputs.branch }}
|
|
run: |
|
|
set -euo pipefail
|
|
count=$(gh pr list --head "$BRANCH" --state open --json number --jq 'length')
|
|
echo "count=$count" >> "$GITHUB_OUTPUT"
|
|
if [ "$count" -gt 0 ]; then
|
|
echo "Open PR already exists for $BRANCH; skipping."
|
|
fi
|
|
|
|
- name: Wait for astral mirror to replicate
|
|
id: mirror
|
|
if: steps.versions.outputs.current != steps.versions.outputs.latest && steps.existing.outputs.count == '0'
|
|
env:
|
|
LATEST: ${{ steps.versions.outputs.latest }}
|
|
run: |
|
|
set -euo pipefail
|
|
# The mirror can lag GitHub Releases. If it hasn't replicated yet,
|
|
# defer the bump rather than landing a pin that races the mirror
|
|
# on every CI run. We probe several arches because partial
|
|
# replication (linux ready, macOS/aarch64 not) would still race
|
|
# CI on other runners.
|
|
assets=(
|
|
"uv-x86_64-unknown-linux-gnu.tar.gz"
|
|
"uv-aarch64-unknown-linux-gnu.tar.gz"
|
|
"uv-x86_64-apple-darwin.tar.gz"
|
|
"uv-aarch64-apple-darwin.tar.gz"
|
|
)
|
|
ready=true
|
|
for asset in "${assets[@]}"; do
|
|
url="https://releases.astral.sh/github/uv/releases/download/${LATEST}/${asset}"
|
|
# `curl -sI` returns nothing on stderr at -s; capture exit code so a
|
|
# permanently broken DNS/TLS path is surfaced instead of collapsing
|
|
# to an opaque "000".
|
|
set +e
|
|
status=$(curl -sIo /dev/null -w '%{http_code}' --max-time 30 "$url" 2>/tmp/curl.err)
|
|
curl_rc=$?
|
|
set -e
|
|
echo "Mirror HEAD $url -> HTTP $status (curl exit=$curl_rc)"
|
|
if [ "$status" != "200" ]; then
|
|
ready=false
|
|
if [ "$curl_rc" -ne 0 ]; then
|
|
echo "::warning::curl failed for $asset (exit=$curl_rc): $(cat /tmp/curl.err 2>/dev/null || true)"
|
|
else
|
|
echo "::warning::astral mirror has not replicated $asset for uv $LATEST yet (HTTP $status)."
|
|
fi
|
|
fi
|
|
done
|
|
if [ "$ready" = "true" ]; then
|
|
echo "ready=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "ready=false" >> "$GITHUB_OUTPUT"
|
|
echo "::warning::Deferring uv bump to $LATEST until all probed arches are mirrored."
|
|
fi
|
|
|
|
- name: Open bump PR
|
|
if: steps.versions.outputs.current != steps.versions.outputs.latest && steps.existing.outputs.count == '0' && steps.mirror.outputs.ready == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
CURRENT: ${{ steps.versions.outputs.current }}
|
|
LATEST: ${{ steps.versions.outputs.latest }}
|
|
BRANCH: ${{ steps.versions.outputs.branch }}
|
|
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
run: |
|
|
set -euo pipefail
|
|
action_file=".github/actions/uv_setup/action.yml"
|
|
|
|
# `grep -c` returns 1 on no-match and 2 on read errors. We want
|
|
# "no match" surfaced as the explicit count-of-zero check below;
|
|
# read errors must abort. Capture the exit code separately so
|
|
# `set -e` doesn't swallow either case.
|
|
set +e
|
|
before=$(grep -cE "UV_VERSION: \"${CURRENT}\"" "$action_file")
|
|
before_rc=$?
|
|
set -e
|
|
if [ "$before_rc" -gt 1 ]; then
|
|
echo "::error::grep read error on $action_file (exit=$before_rc)"
|
|
exit 1
|
|
fi
|
|
if [ "$before" -ne 1 ]; then
|
|
echo "::error::Expected exactly 1 'UV_VERSION: \"$CURRENT\"' in $action_file, found $before"
|
|
exit 1
|
|
fi
|
|
sed -i -E "s/UV_VERSION: \"${CURRENT}\"/UV_VERSION: \"${LATEST}\"/" "$action_file"
|
|
set +e
|
|
after=$(grep -cE "UV_VERSION: \"${LATEST}\"" "$action_file")
|
|
after_rc=$?
|
|
set -e
|
|
if [ "$after_rc" -gt 1 ]; then
|
|
echo "::error::grep read error on $action_file (exit=$after_rc)"
|
|
exit 1
|
|
fi
|
|
if [ "$after" -ne 1 ]; then
|
|
echo "::error::Expected exactly 1 'UV_VERSION: \"$LATEST\"' after sed, found $after"
|
|
exit 1
|
|
fi
|
|
if git diff --quiet "$action_file"; then
|
|
echo "No changes after sed; bailing out (current=$CURRENT, latest=$LATEST)."
|
|
exit 1
|
|
fi
|
|
|
|
# Reuse-or-recreate orphan branch from a prior run that pushed
|
|
# but failed before `gh pr create` (no open PR sits on it).
|
|
# The delete can race a concurrent run (manual workflow_dispatch
|
|
# firing while the cron is mid-flight, since concurrency group
|
|
# does not cancel-in-progress); fall through with a warning so a
|
|
# losing race does not kill an otherwise-clean job mid-state.
|
|
if git ls-remote --exit-code --heads origin "$BRANCH" >/dev/null 2>&1; then
|
|
echo "::warning::Branch $BRANCH exists on origin without an open PR; deleting before recreating."
|
|
if ! git push origin --delete "$BRANCH"; then
|
|
echo "::warning::Delete of $BRANCH failed (concurrent run, or branch already gone); the subsequent push will surface any real conflict."
|
|
fi
|
|
fi
|
|
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git checkout -b "$BRANCH"
|
|
git add "$action_file"
|
|
git commit -m "chore(deps): bump uv to $LATEST"
|
|
git push --set-upstream origin "$BRANCH"
|
|
|
|
body_file="$(mktemp)"
|
|
{
|
|
printf 'Bumps the uv pin in `.github/actions/uv_setup/action.yml` from `%s` to [`%s`](https://github.com/astral-sh/uv/releases/tag/%s).\n\n' "$CURRENT" "$LATEST" "$LATEST"
|
|
printf 'Opened automatically by `bump_uv_pin.yml`. Mirror availability on `releases.astral.sh` was verified before this PR was created, so CI should not race the fallback.\n'
|
|
} > "$body_file"
|
|
|
|
gh pr create \
|
|
--head "$BRANCH" \
|
|
--base "$DEFAULT_BRANCH" \
|
|
--title "chore(deps): bump uv to $LATEST" \
|
|
--body-file "$body_file"
|