-
Notifications
You must be signed in to change notification settings - Fork 28
63 lines (54 loc) · 1.44 KB
/
vendor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
on:
push:
branches:
- main
paths:
- ".github/workflows/vendor.yaml"
- "vendor-one.sh"
workflow_dispatch:
schedule:
- cron: "*/5 * * * *"
concurrency:
group: ${{ github.workflow }}
name: vendor
jobs:
vendor:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.commit.outputs.sha }}
name: "Update vendored sources"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: duckdb/duckdb
path: .git/duckdb
fetch-depth: 0
- uses: ./.github/workflows/git-identity
- name: Vendor sources
id: vendor
run: |
git pull --rebase
./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/main --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
if git push -u origin HEAD; then
gh pr create --fill-first
gh workflow run rcc -f ref=vendor
gh pr merge --auto --squash
fi