Skip to content

Build & Push R devel images #1386

Build & Push R devel images

Build & Push R devel images #1386

Workflow file for this run

name: Build & Push R devel images
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
check-revision:
runs-on: ubuntu-latest
outputs:
svn-revision: ${{ steps.check-revision.outputs.REV }}
steps:
- uses: actions/[email protected]
- name: Check R devel revision
id: check-revision
run: |
pushd "${{ runner.temp }}"
wget https://cloud.r-project.org/src/base-prerelease/R-devel.tar.gz -O R.tar.gz
tar xzf R.tar.gz
REV="$(grep 'Revision:' < R-devel/SVN-REVISION | sed -e 's/Revision:\s*//g')"
echo "REV=${REV}" >>"$GITHUB_OUTPUT"
build:
runs-on: ubuntu-latest
needs:
- check-revision
strategy:
fail-fast: false
matrix:
bakefile:
- devel.docker-bake.json
steps:
- uses: actions/[email protected]
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Build and push Docker images
run: |
CACHE_DIR="${{ runner.temp }}"
# Build rocker/r-ver
BAKE_JSON="bakefiles/${{ matrix.bakefile }}" \
BAKE_OPTION=--push\ --set=*.cache-to=type=local,dest="${CACHE_DIR}"\ --set=*.cache-from=type=local,src="${CACHE_DIR}"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-r-ver"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-rstudio"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-tidyverse"\
\ --set=*.cache-to=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-r-ver" \
make bake-json/r-ver
# Build rocker/rstudio
BAKE_JSON="bakefiles/${{ matrix.bakefile }}" \
BAKE_OPTION=--push\ --set=*.cache-to=type=local,dest="${CACHE_DIR}"\ --set=*.cache-from=type=local,src="${CACHE_DIR}"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-r-ver"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-rstudio"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-tidyverse"\
\ --set=*.cache-to=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-rstudio" \
make bake-json/rstudio
# Build rocker/tidyverse
BAKE_JSON="bakefiles/${{ matrix.bakefile }}" \
BAKE_OPTION=--push\ --set=*.cache-to=type=local,dest="${CACHE_DIR}"\ --set=*.cache-from=type=local,src="${CACHE_DIR}"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-r-ver"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-rstudio"\
\ --set=*.cache-from=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-tidyverse"\
\ --set=*.cache-to=type=gha,scope=svn-revision-"${{ needs.check-revision.outputs.svn-revision }}-tidyverse" \
make bake-json/tidyverse