Skip to content

Docker build, all supported versions #158

Docker build, all supported versions

Docker build, all supported versions #158

Workflow file for this run

name: Docker build, all supported versions
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: ${{ matrix.config.r }}
strategy:
fail-fast: false
matrix:
config:
# - { r: 'devel' }
# - { r: 'next' }
# - { r: '4.4.0' }
- { r: '4.3.3' }
- { r: '4.2.3' }
- { r: '4.1.3' }
- { r: '4.0.5' }
- { r: '3.6.3' }
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@v5
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@v5
with:
platforms: linux/amd64,linux/arm64
push: true
build-args: |
R_VERSION=${{ matrix.config.r }}
tags: ${{ steps.tags.outputs.tags }}
readme:
if: ${{ always() }}
name: Update DEADME
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Update README
uses: ./actions/readme-build