Skip to content

Move install-bundle script to dev-scripts directory (#1745) #483

Move install-bundle script to dev-scripts directory (#1745)

Move install-bundle script to dev-scripts directory (#1745) #483

Workflow file for this run

name: Merge community changes into pro repo
on:
push:
branches:
- master
jobs:
updateFork:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: tiny-pilot/tinypilot-pro
token: ${{ secrets.PR_BOT_PAT }}
- name: Reset the default branch with upstream changes
run: |
git remote add upstream https://github.com/tiny-pilot/tinypilot.git
git fetch upstream master:upstream-master
git reset --hard upstream-master
- name: Get the URL of the original community PR
run: |
set -ux
COMMUNITY_PR_URL="$(curl \
--silent \
--show-error \
https://api.github.com/repos/tiny-pilot/tinypilot/commits/${{ github.sha }}/pulls?per_page=1 | \
jq \
--raw-output \
'.[0].html_url | select (.!=null)')"
readonly COMMUNITY_PR_URL
echo "COMMUNITY_PR_URL=${COMMUNITY_PR_URL}" >> "${GITHUB_ENV}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PR_BOT_PAT }}
branch: community-changes-${{ github.sha }}
delete-branch: true
# If the committer to the community repo (github.actor) has no access
# to the pro repo, the PR will be unassigned.
assignees: ${{ github.actor }}
title: Merge changes from community repository
body: |
Related ${{ env.COMMUNITY_PR_URL }}
${{ github.actor }}, please merge the last changes from community repository:
https://github.com/tiny-pilot/tinypilot/commit/${{ github.sha }}
**Do not use "Squash and merge"!**
Merge this PR with a merge commit, keeping the commit history.
(If you accidentally squash, it's not a disaster, but it will create a bit of noise on the subsequent PR from Community)