vendor #15768
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- uses: ./.github/workflows/custom/before-install | |
if: steps.vendor.outputs.vendor != '' && hashFiles('.github/workflows/custom/before-install/action.yml') != '' | |
- uses: ./.github/workflows/install | |
if: steps.vendor.outputs.vendor != '' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
install-r: false | |
cache-version: vendor | |
needs: check | |
extra-packages: any::rcmdcheck | |
- uses: ./.github/workflows/custom/after-install | |
if: steps.vendor.outputs.vendor != '' && hashFiles('.github/workflows/custom/after-install/action.yml') != '' | |
- uses: ./.github/workflows/check | |
if: steps.vendor.outputs.vendor != '' | |
with: | |
results: ${{ runner.os }}-smoke-test | |
- if: steps.vendor.outputs.vendor != '' && github.event_name != 'pull_request' | |
run: | | |
git push -u origin HEAD |