-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to sync with remote branches on foundries
- Loading branch information
mat83
committed
Jun 26, 2024
1 parent
b882482
commit 7b2b179
Showing
1 changed file
with
29 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Sync with foundries repo | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- development | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source repository | ||
uses: actions/checkout@v2 | ||
- name: Push to destination repository | ||
run: | | ||
git config --global user.email "github@arduino.cc" | ||
git config --global user.name "arduino" | ||
git config --global http.https://source.foundries.io/factories/arduino.extraheader "${FOUNDRIES_ACCESS_TOKEN}" | ||
git clone ${REMOTE_REPO} destination | ||
cd destination | ||
git remote add github-repo .. | ||
git remote update | ||
git merge github-repo/${BRANCH_NAME} | ||
git push origin ${BRANCH_NAME} | ||
env: | ||
FOUNDRIES_ACCESS_TOKEN: ${{ secrets.FOUNDRIES_ACCESS_TOKEN }} | ||
REMOTE_REPO: https://source.foundries.io/factories/arduino/lmp-manifest.git | ||
BRANCH_NAME: ${{ github.base_ref || github.ref_name }} | ||
|