-
Notifications
You must be signed in to change notification settings - Fork 6
33 lines (32 loc) · 1.02 KB
/
fetch-posts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 }}."