Run scraper #1
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: Run scraper | |
# This workflow can be triggered manually or by an API call. | |
# https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event | |
# Example: | |
# curl \ | |
# -X POST \ | |
# -H "Accept: application/vnd.github+json" \ | |
# -H "Authorization: Bearer <YOUR-TOKEN>" \ | |
# https://api.github.com/repos/<OWNER>/twiyou/actions/workflows/scrape.yml/dispatches \ | |
# -d '{"ref": "master"}' | |
on: | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download latest release | |
uses: robinraju/[email protected] | |
with: | |
repository: disksing/twiyou | |
latest: true | |
fileName: "twiyou_*_Linux_x86_64.tar.gz" | |
- name: Extract tarball | |
run: tar -xvf twiyou_*_Linux_x86_64.tar.gz | |
- name: Run scraper | |
run: ./twiyou | |
env: | |
TWITTER_USER_NAME: ${{ secrets.TWITTER_USER_NAME }} | |
TWITTER_BEARER_TOKEN: ${{ secrets.TWITTER_BEARER_TOKEN }} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_USER: ${{ secrets.DB_USER }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
DB_PASSWD: ${{ secrets.DB_PASSWD }} |