Skip to content

Commit

Permalink
add workflow to sync with remote branches on foundries
Browse files Browse the repository at this point in the history
  • Loading branch information
mat83 committed Jun 26, 2024
1 parent b882482 commit 7b2b179
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/repo-sync.yml
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 }}

0 comments on commit 7b2b179

Please sign in to comment.