Skip to content

update

update #255

Workflow file for this run

name: update
on:
workflow_dispatch:
schedule:
# 01-15 through 02-14:
- cron: '0 * 15-31 1 *' # minute 0 every hour in January day 15 and after
- cron: '0 * 1-14 2 *' # minute 0 every hour in February day 14 and before
# 04-15 through 05-14:
- cron: '0 * 15-31 4 *' # minute 0 every hour in April day 15 and after
- cron: '0 * 1-14 5 *' # minute 0 every hour in May day 14 and before
# 07-15 through 08-14:
- cron: '0 * 15-31 7 *' # minute 0 every hour in July day 15 and after
- cron: '0 * 1-14 8 *' # minute 0 every hour in August day 14 and before
# 10-15 through 11-14:
- cron: '0 * 15-31 10 *' # minute 0 every hour in October day 15 and after
- cron: '0 * 1-14 11 *' # minute 0 every hour in November day 14 and before
jobs:
update_staging:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libglpk-dev
- name: Install R.
uses: r-lib/actions/setup-r@v2
with:
extra-repositories: https://community.r-multiverse.org
use-public-rspm: true
- name: Install helper R package.
run: install.packages("multiverse.internals")
shell: Rscript {0}
- name: Check out the staging universe.
uses: actions/checkout@v4
- name: Record versions.
run: |
multiverse.internals::record_versions(
versions = "versions.json",
repo = "https://staging.r-multiverse.org"
)
shell: Rscript {0}
- name: Record issues.
run: |
multiverse.internals::record_issues(
repo = "https://staging.r-multiverse.org",
versions = "versions.json",
output = "issues.json"
)
shell: Rscript {0}
- name: Record non-standard licenses.
run: |
multiverse.internals::record_nonstandard_licenses(
repo = "https://community.r-multiverse.org",
path = "nonstandard_licenses.json"
)
shell: Rscript {0}
- name: Clone community universe.
uses: actions/checkout@v4
with:
repository: '${{ github.repository_owner }}/community'
path: 'community'
- name: Update staging packages.
shell: Rscript {0}
run: |
multiverse.internals::update_staging(
path_staging = getwd(),
path_community = "community",
repo_community = "https://community.r-multiverse.org"
)
- name: Remove community universe clone.
run: rm -rf community
- name: Propose snapshot.
shell: Rscript {0}
run: |
multiverse.internals::propose_snapshot(
path_staging = getwd(),
repo_staging = "https://staging.r-multiverse.org"
)
- name: Commit and push changes.
run: |
git add *.json *.url
if git diff --quiet && git diff --staged --quiet; then
echo "No changes to commit."
else
git config --global user.name github-actions
git config --global user.email [email protected]
git commit -m "Update staging"
git push -u origin main
fi