update-potions #35
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: update-potions | |
on: | |
schedule: | |
- cron: "0 6 1 * *" # run every first day of the month at 6am UTC | |
workflow_dispatch: | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1.2 | |
bundler-cache: true | |
- name: Install dependencies | |
run: bundle install | |
- name: Run scrape potions task | |
run: bundle exec rake scrabby:potions | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update potions | |
title: Update potions | |
body: | | |
This is an automated pull request to update the `potions` data. | |
branch: scrabby/update-potions | |
branch-suffix: timestamp | |
base: main | |
add-paths: data/potions.csv | |
delete-branch: true | |
labels: potions, scrabby-bot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |