Daily R devel and R patched build #1859
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: Daily R devel and R patched build | |
on: | |
workflow_dispatch: | |
inputs: | |
build: | |
description: 'Build R-devel and R-next' | |
required: true | |
type: choice | |
options: | |
- 'yes' | |
- 'no' | |
default: 'yes' | |
readme: | |
description: 'Update README' | |
required: true | |
type: choice | |
options: | |
- 'yes' | |
- 'no' | |
default: 'yes' | |
schedule: | |
- cron: '55 6 * * *' | |
jobs: | |
daily-builds: | |
if: ${{ github.event.inputs.build == '' || github.event.inputs.build == 'yes' }} | |
name: ${{ matrix.config.r }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { r: 'devel' } | |
- { r: 'next' } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64 | |
push: false | |
load: true | |
build-args: | | |
R_VERSION=${{ matrix.config.r }} | |
tags: rhub/r-minimal:test | |
- name: Calculate tags | |
id: tags | |
run: | | |
cp -r tools /tmp | |
docker run -v /tmp/tools:/tools \ | |
rhub/r-minimal:test bash -c "/tools/calculate_tags.sh ${{ matrix.config.r }}" | |
- name: Push | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
R_VERSION=${{ matrix.config.r }} | |
tags: ${{ steps.tags.outputs.tags }} | |
debug: | |
runs-on: ubuntu-latest | |
if: always() | |
name: Parameters | |
steps: | |
- name: Input parameters | |
run: | | |
echo "build: ${{ github.event.inputs.build }}" | |
echo "readme: ${{ github.event.inputs.readme }}" | |
readme: | |
if: ${{ (github.event.inputs.readme == '' || github.event.inputs.readme == 'yes') && always() }} | |
name: Update README | |
runs-on: ubuntu-latest | |
needs: daily-builds | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Update README | |
uses: ./actions/readme-build |