SyncSubModulesBranches #77148
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
# | |
name: SyncSubModulesBranches | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '*/20 * * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: SetSSH key | |
run: | | |
echo $HOME | |
ls -lsa $HOME | |
echo "${{ secrets.BOT_SSH_PRIVATE_KEY }}" > $HOME/.ssh/id_rsa | |
chmod og-rw $HOME/.ssh/id_rsa | |
ls -lsa $HOME/.ssh | |
- name: Sync submodules branches | |
run: | | |
export GITUSER_NAME=gemoc-bot | |
export GITUSER_TOKEN=${{ secrets.BOT_GITUSER_TOKEN }} | |
export GITUSER_PASSWORD=${{ secrets.BOT_GITUSER_PASSWORD }} | |
cd releng-scripts/sync-gemoc-submodules | |
mvn --batch-mode [email protected] clean verify | |
- name: Report branches 🔍 | |
run: | | |
cat releng-scripts/sync-gemoc-submodules/target/syncReport.md >> $GITHUB_STEP_SUMMARY |