Read Recent Public Pastebins #1223
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Read Recent Public Pastebins | |
on: | |
schedule: | |
# Runs "Every 6 hours" | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Execute script | |
run: python script.py | |
- name: Commit changes | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email 'github-action@example.com' | |
git add . | |
git commit -m "Get recent pastes" | |
git push |