Skip to content

Commit 33dd82d

Browse files
author
mujing
committed
build: upgrade GitHub Actions and Docker setup versions
1 parent 7ee4c8d commit 33dd82d

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/build-and-push.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
2929

3030
- name: Get current date for tagging
3131
run: echo "DATE_TAG=$(date +'%Y%m%d')" >> $GITHUB_ENV
@@ -40,18 +40,18 @@ jobs:
4040
echo "IMAGE_NAME=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
4141
4242
- name: Set up Docker Buildx
43-
uses: docker/setup-buildx-action@v3
43+
uses: docker/setup-buildx-action@v4
4444

4545
- name: Log in to the Container registry
46-
uses: docker/login-action@v3
46+
uses: docker/login-action@v4
4747
with:
4848
registry: ghcr.io
4949
username: ${{ github.actor }}
5050
password: ${{ secrets.GITHUB_TOKEN }}
5151

5252
- name: Extract metadata (tags, labels) for Docker
5353
id: meta
54-
uses: docker/metadata-action@v5
54+
uses: docker/metadata-action@v6
5555
with:
5656
images: ${{ env.IMAGE_NAME }}
5757
tags: |
@@ -62,7 +62,7 @@ jobs:
6262
6363
- name: Build and push by digest
6464
id: build
65-
uses: docker/build-push-action@v5
65+
uses: docker/build-push-action@v7
6666
with:
6767
context: .
6868
platforms: ${{ matrix.platform }}
@@ -94,7 +94,7 @@ jobs:
9494

9595
steps:
9696
- name: Checkout repository
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@v6
9898

9999
- name: Get current date for tagging
100100
run: echo "DATE_TAG=$(date +'%Y%m%d')" >> $GITHUB_ENV
@@ -104,10 +104,10 @@ jobs:
104104
echo "IMAGE_NAME=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
105105
106106
- name: Set up Docker Buildx
107-
uses: docker/setup-buildx-action@v3
107+
uses: docker/setup-buildx-action@v4
108108

109109
- name: Log in to the Container registry
110-
uses: docker/login-action@v3
110+
uses: docker/login-action@v4
111111
with:
112112
registry: ghcr.io
113113
username: ${{ github.actor }}
@@ -122,7 +122,7 @@ jobs:
122122

123123
- name: Extract metadata (tags, labels) for Docker
124124
id: meta
125-
uses: docker/metadata-action@v5
125+
uses: docker/metadata-action@v6
126126
with:
127127
images: ${{ env.IMAGE_NAME }}
128128
tags: |
@@ -174,7 +174,7 @@ jobs:
174174
echo "IMAGE_NAME=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
175175
176176
- name: Log in to the Container registry
177-
uses: docker/login-action@v3
177+
uses: docker/login-action@v4
178178
with:
179179
registry: ghcr.io
180180
username: ${{ github.actor }}

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,15 @@ RUN ln -s /usr/local/go/bin/go /usr/local/bin/go \
7575
ENV UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
7676

7777
# Install Miniforge (conda-forge based, no Anaconda ToS required)
78-
RUN install -d -o coder -g coder /opt/conda \
79-
&& ARCH=$(dpkg --print-architecture) && \
78+
RUN ARCH=$(dpkg --print-architecture) && \
8079
if [ "$ARCH" = "amd64" ]; then CONDA_ARCH="x86_64"; \
8180
elif [ "$ARCH" = "arm64" ]; then CONDA_ARCH="aarch64"; \
8281
else CONDA_ARCH="$ARCH"; fi && \
82+
rm -rf /tmp/conda /opt/conda \
8383
curl -fsSL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-${CONDA_ARCH}.sh -o /tmp/miniforge.sh \
8484
&& chmod +x /tmp/miniforge.sh \
85-
&& sudo -u coder bash /tmp/miniforge.sh -b -p /opt/conda \
85+
&& sudo -u coder bash /tmp/miniforge.sh -b -p /tmp/conda \
86+
&& mv /tmp/conda /opt/conda \
8687
&& rm /tmp/miniforge.sh
8788
ENV PATH=/opt/conda/bin:$PATH
8889

0 commit comments

Comments
 (0)