summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: effd6aed5e195a03ed957921e1dfad89d7190e64 (plain)
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
on:
  workflow_dispatch:
  schedule:
  - cron: "0 2 * * 5"
jobs:
  update-symbols:
    permissions:
      contents: write
    runs-on: ubuntu-20.04-4core
    strategy:
      fail-fast: false
    steps:
    - name: free disk space
      run: |
        sudo swapoff -a
        sudo rm -f /swapfile
        sudo apt clean
        docker rmi $(docker image ls -aq)
        df -h
    - uses: actions/checkout@v3
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.11
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r update/requirements.txt
    - name: Run Update Script
      working-directory: ./update
      run: |
        python update_symbols.py
    - name: commit
      run: |
        git add .
        git diff --staged --quiet || git -c user.name='GitHub Actions Bot' -c user.email='<>' commit -m 'Update Symbols'
        git push origin master