You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
897 B
41 lines
897 B
name: Run Python Script on Main Branch |
|
|
|
on: |
|
push: |
|
branches: |
|
- main |
|
workflow_dispatch: |
|
|
|
jobs: |
|
run_script: |
|
runs-on: ubuntu-latest |
|
|
|
steps: |
|
- name: Checkout repository |
|
uses: actions/checkout@v2 |
|
|
|
- name: Set up Python |
|
uses: actions/setup-python@v2 |
|
with: |
|
python-version: 3.8 |
|
|
|
- name: Install dependencies |
|
run: | |
|
python -m pip install --upgrade pip |
|
# Add any other dependencies your script requires here |
|
|
|
- name: Run Python script |
|
run: python convert.py |
|
|
|
- name: Configure Git |
|
run: | |
|
git config --global user.email "actions@github.com" |
|
git config --global user.name "GitHub Actions" |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }} |
|
|
|
- name: Commit and push JSON file |
|
run: | |
|
git add urls.json |
|
git commit -m "Update urls.json" |
|
git push
|
|
|