Skip to content

Build Data

Build Data #106

Workflow file for this run

name: Build Data
on:
schedule:
- cron: '0 12 * * 4'
workflow_dispatch:
jobs:
Build-Data:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: checkout repo content
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }} # checkout the repository content
- name: Install chrome dependencies
run: |
sudo apt-get update
sudo apt-get install -y chromium-browser
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10.8' # install the python version needed
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
- name: execute py script # run main.py
run: python script.py
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: '.'
# The name of the user that will be displayed as the author of the commit.
# Default: depends on the default_author input
author_name: Github Action Robot
# The email of the user that will be displayed as the author of the commit.
# Default: depends on the default_author input
author_email: dontclick@example.com
# The message for the commit.
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'New data for ${{ steps.date.outputs.date }}'
new_branch: newest-data
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
push: origin newest-data --set-upstream --force