Skip to content

Update pipeline_run.yml #81

Update pipeline_run.yml

Update pipeline_run.yml #81

Workflow file for this run

name: run python script
on:
schedule:
- cron: "0 0 * * 0" # runs at 00:00 UTC every Sunday
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
manual_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.10.10
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v2
with:
path: "requirements.txt"
- name: List files for debugging
run: |
ls -R
- name: Execute Python script
run: |
python opensource_health_statistics/run.py
- name: Commit files
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add --all
if [ -z "$(git status --porcelain)" ]; then
echo "::set-output name=push::false"
else
git commit -m "Add changes" -a
echo "::set-output name=push::true"
fi
shell: bash
- name: Push changes
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}