Fetch posts #2976
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: Fetch posts | |
on: | |
schedule: | |
- cron: '33 6,12,18 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
env: | |
PRIVTOOLS_API_KEY: ${{ secrets.PRIVTOOLS_API_KEY }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Fetch posts data | |
run: | | |
pip3 install -r requirements.txt | |
python3 getposts.py | |
git config user.name "Vigilante de posts" | |
git config user.email "actions@users.noreply.github.com" | |
git add old.html | |
git add ./assets/victims.json | |
DATE=$(date -Iseconds) | |
git commit --message="Posts fetch on $DATE" | |
- name: Hace el «push» | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "🍏 This job's status is ${{ job.status }}." |