-
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1004 Bytes
/
sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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