Skip to content

Commit

Permalink
Add pre-release versions to infra
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Sep 25, 2023
1 parent 21c6a68 commit b0f21a4
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-pre.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build pre

on:
workflow_dispatch:

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/i386
context: "{{defaultContext}}:containers"
file: Dockerfile-pre
push: true
provenance: false
tags: ghcr.io/r-hub/evercran/pre,rhub/evercran:pre,docker.io/rhub/evercran:pre
4 changes: 2 additions & 2 deletions .github/workflows/build-sarge.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build w/ Sarge (R 0.49 - R 1.9.1)
name: Build w/ Sarge (- R 1.9.1)

on:
workflow_dispatch:
Expand All @@ -23,7 +23,7 @@ jobs:
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/,$//')"
out="$(cat containers/prerelease-versions.txt containers/sarge-versions.txt | tr '\n' ',' | sed 's/,$//')"
else
out=$inp
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deb-sarge.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Debian package w/ Sarge (R 0.49 - R 1.9.1)
name: Debian package w/ Sarge (- R 1.9.1)

on:
workflow_dispatch:
Expand All @@ -22,7 +22,7 @@ jobs:
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/,$//')"
out="$(cat containers/prerelease-versions.txt containers/sarge-versions.txt | tr '\n' ',' | sed 's/,$//')"
else
out=$inp
fi
Expand Down
23 changes: 23 additions & 0 deletions containers/Dockerfile-pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- Dockerfile -*-

FROM debian/eol:sarge

ENV PAGER=less
ENV LESS=-r

RUN echo 'deb http://ppa.r-pkg.org/evercran sarge main' \
>> /etc/apt/sources.list

COPY prerelease-versions.txt .

RUN apt-get update && \
apt-get install -y linux32 `cat prerelease-versions.txt | sed 's/^/r-/'` && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/lib/apt/lists/partial && \
rm prerelease-versions.txt

WORKDIR /root

ENTRYPOINT [ "linux32" ]
CMD [ "bash" ]
18 changes: 18 additions & 0 deletions containers/prerelease-versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.10
0.11
0.12
0.13
0.14
0.15
0.16
0.16.1

0 comments on commit b0f21a4

Please sign in to comment.