This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Core #6
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: Core | |
on: | |
schedule: | |
- cron: "0 21 * * 1" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
sync: | |
name: Sync | |
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Git | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies | |
run: | | |
pip install python-dateutil | |
cargo install --git https://github.com/MRepoApp/mrepo-rs.git --features git | |
- name: Sync | |
run: | | |
mrepo update --ssh-key='${{ secrets.SSH_PRIVATE_KEY }}' | |
- name: Push | |
run: | | |
python scripts/git-commit.py | |
git push origin main |