Skip to content

Add support for building multiple r versions #12

Add support for building multiple r versions

Add support for building multiple r versions #12

Workflow file for this run

name: Build & Publish
on:
push:
tags: [ '*.*.*' ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ghcr.io/${{ github.repository }}
LATEST_VERSION: 4.4.2
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
r_version:
- 4.2.3
- 4.3.3
- 4.4.2
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build
run: make --no-builtin-rules build R_VERSION=${{ matrix.r_version }}
- name: Unit Tests
run: make --no-builtin-rules test R_VERSION=${{ matrix.r_version }}
- name: Log into registry
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish images
if: github.event_name != 'pull_request'
run: make --no-builtin-rules push R_VERSION=${{ matrix.r_version }}
- name: Publish latest images
if: github.event_name != 'pull_request' && '${{ matrix.r_version }}' == '${{ env.LATEST_VERSION }}'
run: make --no-builtin-rules push-latest R_VERSION=${{ matrix.r_version }}