Skip to content

harvest

harvest #3

Workflow file for this run

# Weekly catalog harvest. Regenerates the catalog from the openwashdata
# GitHub organisation, runs the schema and content gates, and opens or
# updates one pull request with the generated files. The maintainer
# merges it; the harvest never pushes to main.
#
# A pull request opened with the built-in GITHUB_TOKEN triggers no
# pull_request workflows, so the gate runs inside this job. R-CMD-check
# and pkgdown run on main after the merge, which is a normal push by a
# person. Do not make R-CMD-check a required status on main, or this
# pull request can never merge.
#
# A failed run is red in the Actions tab and opens no pull request.
# There is no failure-issue automation.
name: harvest
on:
schedule:
- cron: '0 3 * * 1'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
harvest:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
LANG: C.UTF-8
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2, any::pkgload, any::testthat
needs: harvest
# The gate below fails on <U+xxxx> escapes, so the locale matters.
- name: Run harvest
env:
OWD_HARVEST_BACKEND: github
run: Rscript data-raw/harvest.R
- name: Regenerate documentation
run: Rscript -e 'roxygen2::roxygenise()'
- name: Schema and content gate
run: Rscript -e 'testthat::test_local(stop_on_failure = TRUE)'
- name: Open or update the harvest pull request
uses: peter-evans/create-pull-request@v6
with:
branch: harvest
base: main
add-paths: |
R/sysdata.rda
inst/extdata
data-raw/packages.json
data-raw/harvest_report.md
man
NAMESPACE
DESCRIPTION
commit-message: "chore: weekly catalog harvest"
title: "Weekly catalog harvest"
body-path: data-raw/harvest_report.md
delete-branch: false