Daily sync #1796
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: Daily sync | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Configuration | |
run: | | |
git config --local user.name "Github Action" | |
git config --local user.email "[email protected]" | |
sudo apt-get update -y && sudo apt-get install -y libkrb5-dev | |
mkdir -p $HOME/.config && echo "$TOKEN" > $HOME/.config/copr | |
pip install copr-cli | |
env: | |
TOKEN: ${{ secrets.COPR_TOKEN }} | |
- name: Sync with CRAN | |
run: | | |
Rscript copr-sync-fix.r || touch failure | |
Rscript copr-sync.r || touch failure | |
git add specs | |
git diff-index --quiet HEAD || git commit -m "sync" | |
git push | |
! test -f failure |