Skip to content

Commit

Permalink
[docker] 重建镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangyunHuang committed Dec 11, 2023
1 parent 4819e54 commit 47798ef
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["rockylinux", "rockylinx2", "fedora"]
os: ["rockylinux", "fedora"]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
QUARTO_VERSION: "1.4.515"
Expand All @@ -35,8 +35,8 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-
key: ${{ runner.os }}-${{ matrix.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.os }}-buildx-

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -45,59 +45,60 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Rocky Linux with RStudio Server

- name: Rocky Linux with RStudio Server Pro
if: matrix.os == 'rockylinux'
uses: docker/build-push-action@v5
with:
context: docker
file: docker/rockylinux_rstudio.Dockerfile
target: rockylinux-rstudio
file: docker/rockylinux_rstudio_max.Dockerfile
target: rockylinux-rstudio-max
pull: true
push: true
build-args: |
QUARTO_VERSION=${{ env.QUARTO_VERSION }}
GITHUB_PAT=${{ env.GITHUB_PAT }}
R_VERSION=${{ env.R_VERSION }}
RSTUDIO_VERSION=${{ env.RSTUDIO_VERSION }}
tags: ${{ env.REGISTRY }}/rockylinux-rstudio:${{ env.QUARTO_VERSION }}
tags: ${{ env.REGISTRY }}/${{ matrix.os }}-rstudio-max:${{ env.QUARTO_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Rocky Linux with RStudio Server Pro
- name: Rocky Linux with RStudio Server
if: matrix.os == 'rockylinux'
uses: docker/build-push-action@v5
with:
context: docker
file: docker/rockylinux_rstudio_pro.Dockerfile
target: rockylinux-rstudio-pro
file: docker/rockylinux_rstudio.Dockerfile
target: rockylinux-rstudio
pull: true
push: true
build-args: |
QUARTO_VERSION=${{ env.QUARTO_VERSION }}
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
GITHUB_PAT=${{ env.GITHUB_PAT }}
REGISTRY=${{ env.REGISTRY }}
tags: ${{ env.REGISTRY }}/rockylinux-rstudio-pro:${{ env.QUARTO_VERSION }}
RSTUDIO_VERSION=${{ env.RSTUDIO_VERSION }}
tags: ${{ env.REGISTRY }}/${{ matrix.os }}-rstudio:${{ env.QUARTO_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max


- name: Rocky Linux with RStudio Server Pro
if: matrix.os == 'rockylinux2'
if: matrix.os == 'rockylinux'
uses: docker/build-push-action@v5
with:
context: docker
file: docker/rockylinux_rstudio_max.Dockerfile
target: rockylinux-rstudio-max
file: docker/rockylinux_rstudio_pro.Dockerfile
target: rockylinux-rstudio-pro
pull: true
push: true
build-args: |
QUARTO_VERSION=${{ env.QUARTO_VERSION }}
R_VERSION=${{ env.R_VERSION }}
RSTUDIO_VERSION=${{ env.RSTUDIO_VERSION }}
tags: ${{ env.REGISTRY }}/rockylinux-rstudio-max:${{ env.QUARTO_VERSION }}
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
GITHUB_PAT=${{ env.GITHUB_PAT }}
REGISTRY=${{ env.REGISTRY }}
tags: ${{ env.REGISTRY }}/${{ matrix.os }}-rstudio-pro:${{ env.QUARTO_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max


- name: fedora with RStudio Server
if: matrix.os == 'fedora'
uses: docker/build-push-action@v5
Expand All @@ -111,7 +112,7 @@ jobs:
QUARTO_VERSION=${{ env.QUARTO_VERSION }}
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
GITHUB_PAT=${{ env.GITHUB_PAT }}
tags: ${{ env.REGISTRY }}/fedora-rstudio:${{ env.QUARTO_VERSION }}
tags: ${{ env.REGISTRY }}/${{ matrix.os }}-rstudio:${{ env.QUARTO_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand All @@ -129,7 +130,7 @@ jobs:
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
GITHUB_PAT=${{ env.GITHUB_PAT }}
REGISTRY=${{ env.REGISTRY }}
tags: ${{ env.REGISTRY }}/fedora-rstudio-pro:${{ env.QUARTO_VERSION }}
tags: ${{ env.REGISTRY }}/${{ matrix.os }}-rstudio-pro:${{ env.QUARTO_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down

0 comments on commit 47798ef

Please sign in to comment.