Skip to content

ci: add gha workflows from MOSuite #1

ci: add gha workflows from MOSuite

ci: add gha workflows from MOSuite #1

Workflow file for this run

name: auto-format
on:
workflow_dispatch:
pull_request:
env:
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- uses: CCBR/actions/install-r-pak@main
with:
r-version: 4.4
versions-file: .github/package-versions.txt
extra-packages: local::.
needs: dev
- name: Format R code with air
uses: rstudio/shiny-workflows/format-r-code@v1
- name: update Galaxy blueprints
shell: Rscript {0}
run: |
source('inst/extdata/galaxy/galaxy.R')
write_package_json_blueprints()
- name: render README.Rmd & docs
shell: Rscript {0}
run: |
rmarkdown::render("README.Rmd")
roxygen2::roxygenize()
- name: update citation
shell: Rscript {0}
run: |
# See https://docs.ropensci.org/cffr/articles/cffr.html
library(cffr)
mykeys <- list(identifiers = list(list(
description = "Archived snapshots of all versions",
type = "doi",
value = "10.5281/zenodo.16371580"
)))
cf <- cff_create(keys = mykeys)
# Create your CITATION.cff file
cff_write(cf)
- name: update codemeta
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--format codemeta --outfile codemeta.json"
- name: commit & push
run: |
git add .
git commit -m "ci: 🤖 auto-format" || echo "nothing to commit"
git push || echo "nothing to push"