Skip to content

CI

CI #1348

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
schedule:
- cron: '0 22 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
top-followers:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install requests
run: pip install requests
- name: Update README
run: python getTopFollowers.py ${{ github.repository_owner }} ${{ secrets.GITHUB_TOKEN }} README.md
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "Update top followers"
- name: Pull changes
run: git pull -r
- name: Push changes
uses: ad-m/github-push-action@b007e7b818e33b04afd056e4c4b57ba917145d7a
with:
github_token: ${{ secrets.GITHUB_TOKEN }}