-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (51 loc) · 1.53 KB
/
deb-sarge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 }}