This repository was archived by the owner on Mar 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +460
-0
lines changed Expand file tree Collapse file tree 3 files changed +460
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Processing Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - ' *'
9
+ paths :
10
+ - ' processing/**'
11
+ pull_request :
12
+ branches :
13
+ - main
14
+ paths :
15
+ - ' processing/**'
16
+
17
+ env :
18
+ REGISTRY : ghcr.io
19
+
20
+ jobs :
21
+ build :
22
+ runs-on : ubuntu-latest
23
+ permissions :
24
+ contents : read
25
+ packages : write
26
+
27
+ steps :
28
+ - name : Checkout code
29
+ uses : actions/checkout@v4
30
+
31
+ - name : Login to GitHub Container Registry
32
+ uses : docker/login-action@v3
33
+ with :
34
+ registry : ${{ env.REGISTRY }}
35
+ username : ${{ github.actor }}
36
+ password : ${{ secrets.GITHUB_TOKEN }}
37
+
38
+ - name : Extract metadata (tags, labels) for processing container
39
+ id : meta-processing
40
+ uses : docker/metadata-action@v5
41
+ with :
42
+ images : ${{ env.REGISTRY }}/${{ github.repository }}/processing
43
+ flavor : latest=false
44
+ tags : |
45
+ type=ref,event=branch
46
+ type=ref,event=pr
47
+ type=sha,prefix=main-
48
+ type=semver,pattern={{version}}
49
+ type=semver,pattern={{major}}.{{minor}}
50
+
51
+ - name : Build and push processing container image
52
+ uses : docker/build-push-action@v5
53
+ with :
54
+ context : ./processing
55
+ file : ./processing/dockerfile
56
+ push : true
57
+ tags : ${{ steps.meta-processing.outputs.tags }}
Original file line number Diff line number Diff line change
1
+ FROM rocker/r-ver:4.3.3
2
+
3
+ WORKDIR /home/docker/
4
+
5
+ # Library initialization using renv
6
+ RUN Rscript --vanilla -e " \
7
+ options(repos = c(CRAN = 'https://cloud.r-project.org')); \
8
+ install.packages('renv') \
9
+ "
10
+
11
+ # Direct dependencies
12
+ RUN Rscript --vanilla -e " \
13
+ renv::install( \
14
+ packages = c( \
15
+ 'dplyr@1.1.4', \
16
+ 'magrittr@2.0.3', \
17
+ 'optparse@1.7.5', \
18
+ 'readr@2.1.5', \
19
+ 'renv@1.0.7', \
20
+ 'stringr@1.5.1', \
21
+ 'tidyr@1.3.1' \
22
+ ), \
23
+ prompt = F, \
24
+ lock = T \
25
+ ) \
26
+ "
27
+ # Data processing code
28
+ COPY process.R /home/docker/
29
+
30
+ # Run container
31
+ ENTRYPOINT ["Rscript", "--vanilla", "process.R"]
You can’t perform that action at this time.
0 commit comments