-
Notifications
You must be signed in to change notification settings - Fork 24
45 lines (35 loc) · 1.29 KB
/
aleph.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
38
39
40
41
42
43
44
45
name: Check for Aleph Updates
on:
schedule:
- cron: "23 23 * * 2" # This will run the workflow at 4:00 PM Pacific Time every Tuesday
jobs:
check_aleph:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyYAML requests
- name: Download and edit Aleph docker-compose.yml
run: python .github/workflows/aleph/download_and_edit_aleph.py
- name: Install and authenticate GitHub CLI
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
sudo apt-get install -y gh
echo "export GITHUB_TOKEN=$GH_TOKEN" >> $GITHUB_ENV
- name: Check for changes and commit to main branch
run: |
git config --global user.email "[email protected]"
git config --global user.name "micahbot"
git checkout main
cp temp_docker-compose.yml chapter-5/aleph/docker-compose.yml
git add chapter-5/aleph/docker-compose.yml
git diff-index --quiet HEAD || git commit -m "Updating Aleph"
git push origin main