Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically sync commits from upstream #5

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Upstream Sync"

on:
schedule:
# at 07:00 every Monday and Thursday
- cron: "0 7 * * 1,4"
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
poky_branch:
runs-on: ubuntu-latest
name: Poky branch

strategy:
matrix:
branch:
- dunfell
- honister
- kirkstone
- thud
- warrior
- pyro
- rocko
- sumo

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

# https://github.com/aormsby/Fork-Sync-With-Upstream-action
- name: Sync upstream commits
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: ${{ matrix.branch }}
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_branch: ${{ matrix.branch }}
host_domain: git.yoctoproject.org
upstream_sync_repo: git/poky
test_mode: ${{ github.event_name == 'pull_request' }}

- name: New commits synced
if: steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were synced." >> $GITHUB_STEP_SUMMARY

- name: No new commits
if: steps.sync.outputs.has_new_commits == 'false'
run: echo "There were no new commits." >> $GITHUB_STEP_SUMMARY