This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
forked from ionic-team/stencil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,43 @@ jobs: | |
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tgymnich/[email protected] | ||
with: | ||
base: main | ||
head: main | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check for new release in fork | ||
id: check_fork_release | ||
run: | | ||
FORK_RELEASE=$(git ls-remote --tags https://github.com/smartive/stencil-patched.git | cut -d '/' -f 3 | sort -V | tail -n 1) | ||
echo "Latest fork release: $FORK_RELEASE" | ||
echo "::set-output name=fork_release_tag::$FORK_RELEASE" | ||
- name: Fetch upstream changes | ||
run: | | ||
git remote add upstream https://github.com/ionic-team/stencil.git | ||
git fetch upstream | ||
- name: Check for new release in upstream | ||
id: check_upstream_release | ||
run: | | ||
UPSTREAM_RELEASE=$(git ls-remote --tags https://github.com/ionic-team/stencil.git | cut -d '/' -f 3 | sort -V | tail -n 1) | ||
echo "Latest upstream release: $UPSTREAM_RELEASE" | ||
echo "::set-output name=upstream_release_tag::$UPSTREAM_RELEASE" | ||
- name: Create Pull Request | ||
if: steps.check_fork_release.outputs.fork_release_tag != steps.check_upstream_release.outputs.upstream_release_tag | ||
run: | | ||
#Set up Git | ||
git config user.name 'CI-Robot' | ||
git config user.email '[email protected]' | ||
# Set up your branch for changes | ||
git checkout -b sync-branch | ||
# Make changes, update files, etc. based on the new release | ||
# Commit and push changes to your forked repository | ||
git add . | ||
git commit -m "Sync with upstream release ${{ steps.check_upstream_release.outputs.upstream_release_tag }}" | ||
git push origin sync-branch | ||
# Create Pull Request | ||
gh pr create --base main --head sync-branch --title "Sync with upstream release ${{ steps.check_upstream_release.outputs.upstream_release_tag }}" --body "Syncing with the latest upstream release." |