-
Notifications
You must be signed in to change notification settings - Fork 35
113 lines (97 loc) · 2.61 KB
/
r-devel-daily.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Daily R devel and R patched build
on:
workflow_dispatch:
inputs:
build:
description: 'Build R-devel and R-next'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
readme:
description: 'Update README'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
schedule:
- cron: '55 6 * * *'
jobs:
daily-builds:
if: ${{ github.event.inputs.build == '' || github.event.inputs.build == 'yes' }}
name: ${{ matrix.config.r }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- { r: 'devel' }
- { r: 'next' }
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@v6
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@v6
with:
platforms: linux/amd64,linux/arm64
push: true
build-args: |
R_VERSION=${{ matrix.config.r }}
tags: ${{ steps.tags.outputs.tags }}
debug:
runs-on: ubuntu-latest
if: always()
name: Parameters
steps:
- name: Input parameters
run: |
echo "build: ${{ github.event.inputs.build }}"
echo "readme: ${{ github.event.inputs.readme }}"
readme:
if: ${{ (github.event.inputs.readme == '' || github.event.inputs.readme == 'yes') && always() }}
name: Update README
runs-on: ubuntu-latest
needs: daily-builds
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Update README
uses: ./actions/readme-build