Deb w/ Sarge (- R 2.5.1) #40
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: Deb w/ Sarge (- R 2.5.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/prerelease-versions.txt 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 }} |