Skip to content

Sync downstream release-2023b branch with upstream's #2

Sync downstream release-2023b branch with upstream's

Sync downstream release-2023b branch with upstream's #2

# This GitHub action is meant to be triggered weekly in order to sync the upstream release branch with the downstream branch fork
name: Sync downstream release-2023b branch with upstream's
on:
# Triggers the workflow every Tue at 8 A.M
schedule:
- cron: "0 8 * * 2"
workflow_dispatch: # for manual trigger workflow from GH Web UI
env:
# UPSTREAM_URL: "https://github.com/opendatahub-io/notebooks.git"
UPSTREAM_REPO: "opendatahub-io/notebooks"
UPSTREAM_BRANCH: "2023b"
DOWNSTREAM_BRANCH: "release-2023b"
jobs:
sync_latest_from_upstream:
runs-on: ubuntu-latest
# Bug in GitHub Action does not support env variable in name
name: sync release branch from 2023b to release-2023b
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ env.DOWNSTREAM_BRANCH }}
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: ${{ env.DOWNSTREAM_BRANCH }}
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_branch: ${{ env.UPSTREAM_BRANCH }}
upstream_sync_repo: ${{ env.UPSTREAM_REPO }}
- name: New commits found
if: steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were found to sync."