Skip to content

Deb w/ Sarge (- R 2.5.1) #23

Deb w/ Sarge (- R 2.5.1)

Deb w/ Sarge (- R 2.5.1) #23

Workflow file for this run

name: Debian package w/ Sarge (R 0.49 - R 1.9.1)
on:
workflow_dispatch:
inputs:
inpwhichcont:
description: 'Which R versions to build, defaults to "all".'
required: false
default: 'all'
type: string
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.setup-matrix.outputs.containers }}
steps:
- uses: actions/checkout@v3
- name: Set up matrix of containers
id: setup-matrix
run: |
inp="${{ github.event.inputs.inpwhichcont }}"
if [ "x$inp" == "xall" -o "x$inp" == "x" ]; then
out="$(cat containers/sarge-versions.txt | tr '\n' ',' | sed 's/,$//')"
else
out=$inp
fi
cnt="$(echo '["'$out'"]' | tr -d ' ' | sed 's/,/","/g')"
echo "containers=$cnt" >> $GITHUB_OUTPUT
packages:
needs: setup-matrix
strategy:
fail-fast: false
matrix:
container: ${{ fromJson(needs.setup-matrix.outputs.containers) }}
runs-on: ubuntu-latest
name: R ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Build
run: |
cd r-builds
docker compose build r-${{ matrix.container }}
docker compose up r-${{ matrix.container }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
r-builds/output/*.deb
name: "R ${{ matrix.container }}"
tag_name: "v${{ matrix.container }}"
repository: r-hub/R
token: ${{ secrets.DEPLOY_TOKEN }}