Skip to content

Instantly share code, notes, and snippets.

@mat-0
Created June 5, 2022 08:32
Show Gist options
  • Select an option

  • Save mat-0/314fc390936e862bc4c264e1e1cc57d0 to your computer and use it in GitHub Desktop.

Select an option

Save mat-0/314fc390936e862bc4c264e1e1cc57d0 to your computer and use it in GitHub Desktop.

Revisions

  1. mat-0 created this gist Jun 5, 2022.
    38 changes: 38 additions & 0 deletions post-php-to-python-3.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    name: Daily Build
    # build
    on:
    workflow_dispatch:
    schedule:
    - cron: '30 7 * * *'

    jobs:
    build:
    runs-on: ubuntu-latest
    steps:
    - name: Check out repo
    uses: actions/checkout@v2
    - name: Set up Python
    uses: actions/setup-python@v2
    with:
    python-version: 3.8
    - uses: actions/cache@v2
    name: Configure pip caching
    with:
    path: ~/.cache/pip
    key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
    restore-keys: |
    ${{ runner.os }}-pip-
    - name: Install Python dependencies
    run: |
    python -m pip install -r requirements.txt
    - name: Update README
    run: |-
    python 'python/build.py'
    cat README.md
    - name: Commit and push if README changed
    run: |-
    git diff
    git config --global user.email "[email protected]"
    git config --global user.name "README-bot"
    git diff --quiet || (git add README.md && git commit -m "Updated README")
    git push