daily-submodule-sync #1447
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
# ----------------------------------------------------------------------------- | |
# Sync submodules daily | |
# Author: Urs Roesch https://github.com/uroesch | |
# Version: 0.3.0 | |
# ----------------------------------------------------------------------------- | |
name: daily-submodule-sync | |
on: | |
push: | |
branches: | |
- workflow/* | |
schedule: | |
- cron: '10 3 * * *' # Sync submodules daily | |
workflow_dispatch: | |
jobs: | |
daily-submodule-sync: | |
timeout-minutes: 90 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
submodules: recursive | |
- name: Setup git | |
shell: bash | |
run: |2+ | |
set -x | |
git config user.name "Urs Roesch" | |
git config user.email "[email protected]" | |
- name: Update apps and commit | |
shell: bash | |
run: |2+ | |
set -x | |
pwsh -ExecutionPolicy ByPass -File scripts/pull-all.ps1 | |
git status --short | grep --quiet --word-regexp M || exit 0 | |
git commit --all --message "Application submodule sync - $(date +%F)" | |
git push origin main |