Skip to content

vendor

vendor #66532

Workflow file for this run

# Automated vendoring workflow for DuckDB sources
# Runs hourly to sync with upstream DuckDB repository
# main branch: vendors from v1.3-ossivalis (stable) - branch name may change with releases
# next branch: vendors from main (bleeding edge)
# See scripts/VENDORING.md for complete documentation
on:
push:
branches:
- main
- next
paths:
- ".github/workflows/vendor.yaml"
- "scripts/vendor-one.sh"
workflow_dispatch:
schedule:
- cron: "0 * * * *"
concurrency:
group: ${{ github.workflow }}
name: vendor
jobs:
vendor:
runs-on: ubuntu-latest
strategy:
matrix:
# REMINDER: When changing branch names below,
# update the documentation in scripts/VENDORING.md accordingly (see disclaimers section)
include:
- branch: main
upstream: v1.4-andium
- branch: next
upstream: main
outputs:
sha: ${{ steps.commit.outputs.sha }}
name: "Update vendored sources (${{ matrix.branch }})"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ matrix.branch }}
- uses: actions/checkout@v4
with:
repository: duckdb/duckdb
path: .git/duckdb
fetch-depth: 0
ref: ${{ matrix.upstream }}
- uses: ./.github/workflows/git-identity
- name: Vendor sources
id: vendor
run: |
git pull --rebase
scripts/vendor-one.sh .git/duckdb
rm -rf .git/duckdb
git push --dry-run
# Check if ahead of upstream branch
# If yes, set a step output
if [ $(git rev-list HEAD...origin/${{ matrix.branch }} --count) -gt 0 ]; then
# Avoid set-output, it's deprecated
echo "vendor=ok" >> "$GITHUB_OUTPUT"
fi
- name: Create PR
if: steps.vendor.outputs.vendor != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
git checkout -b vendor-${{ matrix.branch }}
if git push -u origin HEAD; then
gh pr create --base ${{ matrix.branch }} --fill-first
gh workflow run rcc -f ref=vendor-${{ matrix.branch }}
gh pr merge --auto --squash
fi