Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dergigi committed Jul 23, 2023
1 parent 456148e commit 5fd8f45
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update Resources

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '* /10 * * *'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: BSFishy/pip-action@v1
with:
packages: virtualenv

# Runs a set of commands using the runners shell
- name: Update Resources
shell: bash
env:
GDOC_CLIENT_SECRET: ${{ secrets.GDOC_CLIENT_SECRET }}
run: |
cd scripts/spreadsheet_to_resource_mds/
echo Creating client secret...
echo $GDOC_CLIENT_SECRET > client_secret.json
echo Switching into virtual Python3 environment...
virtualenv -p python3 env
echo Sourcing environment...
source env/bin/activate
echo Installing requirements...
pip3 install -r requirements.txt
echo Updating all bitcoin resources from spreadsheet...
./update_all.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: 'chore(db): update translations'
reviewers: dergigi

0 comments on commit 5fd8f45

Please sign in to comment.