Skip to content

merge-main

merge-main #287

Workflow file for this run

name: merge-main
on:
schedule:
- cron: '30 01 * * *'
workflow_dispatch:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
env:
BRANCH: bazel/general-overhaul
REPO: bentoml/bentoml
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
jobs:
merge-upstream-main:
if: github.repository_owner == 'aarnphm'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install jq, curl
run: sudo apt-get install -y jq curl
- name: Get infos
id: meta
run: |
echo "sha=$(curl -SsL "https://api.github.com/repos/${{ env.REPO }}/commits/main" | jq -r ".sha")" >> $GITHUB_OUTPUT
- name: update with upstream main
run: |
git config user.name "${{ env.GIT_AUTHOR_NAME }}"
git config user.email "${{ env.GIT_AUTHOR_EMAIL }}"
git remote add upstream https://github.com/bentoml/BentoML.git
git fetch upstream main
# NOTE: running vendorred dependencies
./tools/dependencies
[[ "$(git diff --exit-code)" -eq 0 ]] && echo "No need to vendorred" || ( git add . && git commit --signoff -m "cron: update vendorred dependencies [generated]" )
git merge upstream/main --no-edit --signoff --ff -m "merge: update with upstream/main [${{ steps.meta.outputs.sha }}]"
git push origin ${{ env.BRANCH }}