Skip to content

Commit 0ae3204

Browse files
committed
Use engine commit hash when vendoring sources
This PR brings duckdb/duckdb-odbc#102 changes to JDBC repo. The intention is to only run `Vendor.yml` workflow on a dispatch call from the mainline DuckDB after the CI runs are passed and extensions are built. On DuckDB engine side the workflow dispatch call is being added in duckdb/duckdb#17099 .
1 parent b21a996 commit 0ae3204

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

.github/workflows/Nightly.yml renamed to .github/workflows/Vendor.yml

+5-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1+
name: Vendor
12
on:
2-
push:
3-
branches:
4-
- main
5-
paths:
6-
- ".github/workflows/Nightly.yml"
7-
- "vendor.py"
83
workflow_call:
94
inputs:
105
duckdb-sha:
@@ -19,28 +14,21 @@ on:
1914
required: false
2015
default: ''
2116
type: 'string'
22-
schedule:
23-
- cron: "17 0 * * *"
24-
25-
name: Vendor upstream DuckDB sources
2617

2718
jobs:
2819
vendor:
2920
runs-on: ubuntu-latest
3021
outputs:
3122
did_vendor: ${{ steps.vendor.outputs.vendor }}
3223

33-
name: "Update vendored sources"
24+
name: "Update Vendored Sources"
3425
if: github.repository == 'duckdb/duckdb-java'
3526

3627
steps:
37-
- uses: actions/setup-python@v5
38-
with:
39-
python-version: '3.10'
40-
4128
- uses: actions/checkout@v4
4229
with:
4330
fetch-depth: 0
31+
token: ${{ secrets.PAT_TOKEN }}
4432

4533
- uses: actions/checkout@v4
4634
with:
@@ -60,13 +48,14 @@ jobs:
6048
- name: Vendor sources
6149
id: vendor
6250
run: |
51+
export REV=$(cd .git/duckdb && git rev-parse --short HEAD && cd ../..)
52+
echo "Updating vendored DuckDB sources to $REV"
6353
git config --global user.email "[email protected]"
6454
git config --global user.name "DuckDB Labs GitHub Bot"
6555
git rm -rf src/duckdb
6656
python vendor.py --duckdb .git/duckdb
6757
git add src/duckdb CMakeLists.txt
6858
rm -rf .git/duckdb
69-
export REV=`git rev-parse --short HEAD`
7059
git commit -m "Update vendored DuckDB sources to $REV"
7160
git push --dry-run
7261
# Check if ahead of upstream branch
@@ -79,9 +68,3 @@ jobs:
7968
- if: steps.vendor.outputs.vendor != '' && github.event_name != 'pull_request'
8069
run: |
8170
git push -u origin HEAD
82-
83-
rebuild:
84-
needs: vendor
85-
if: ${{ needs.vendor.outputs.did_vendor != '' }}
86-
uses: ./.github/workflows/Java.yml
87-
secrets: inherit

0 commit comments

Comments
 (0)