Open
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
::error::other side closed
error stable occurrence.
hardware: starfive visionfive2
os: base image ubuntu:latest
(riscv64)
➜ riscv64 git:(master) uname -a
Linux ubuntu 6.2.0-39-generic #40.1-Ubuntu SMP Fri Dec 1 11:12:19 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
pipeline platform: gitea action

dockerfile:
# syntax=docker/dockerfile:1
FROM alpine AS base
# arm64-specific stage
FROM ubuntu:latest AS build-arm64
RUN echo "This stage is used on arm64"
# amd64-specific stage
FROM ubuntu:latest AS build-amd64
RUN echo "This stage is used on amd64 (x86)"
# amd64-specific stage
FROM ubuntu:latest AS build-riscv64
RUN echo "This stage is used on amd64 (x86)"
# common steps
FROM build-${TARGETARCH} AS build
RUN echo "This stage is used on all architectures"
FROM build
COPY "./cargo" "~/.cargo"
RUN apt update -y && apt install git build-essential wget pkg-config libssl-dev -y
# install rust
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) rustArch='x86_64-unknown-linux-gnu' ;; \
arm64) rustArch='aarch64-unknown-linux-gnu' ;; \
riscv64) rustArch='riscv64gc-unknown-linux-gnu' ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac; \
\
url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \
wget "$url"; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-toolchain stable; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
cargo --version; \
rustc --version; \
cargo install wasm-pack; \
cargo install --force cbindgen; \
cargo install --force typst-cli;
# install nodejs
RUN apt-get update -y && apt-get install -y ca-certificates curl gnupg rinse; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=20; \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update && apt-get install nodejs -y
# install golang
RUN dpkgArch="$(dpkg --print-architecture)"; \
gopkg="go1.21.6.linux-${dpkgArch}"; \
wget "https://go.dev/dl/${gopkg}.tar.gz"; \
tar zxf "./${gopkg}.tar.gz"; \
rm "./${gopkg}.tar.gz"; \
mv ./go /usr/local/;
ENV PATH=/usr/local/go/bin:$PATH
# install docker-ce-cli
RUN dpkgArch="$(dpkg --print-architecture)"; \
if [ "$dpkgArch" = "riscv64" ]; then \
wget https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/docker-v19.03.8-dev_riscv64.deb; \
apt install ./docker-v19.03.8-dev_riscv64.deb -y; \
rm docker-v19.03.8-dev_riscv64.deb; \
else \
apt-get update; \
apt-get install ca-certificates curl gnupg; \
install -m 0755 -d /etc/apt/keyrings; \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
chmod a+r /etc/apt/keyrings/docker.gpg; \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null; \
apt-get update -y; \
apt-get install docker-ce-cli -y; \
fi
Expected behaviour
run metadata will
Actual behaviour
::error::other side closed
error stable occurrence.
Repository URL
No response
Workflow run URL
No response
YAML workflow
name: ci
on:
push:
tags:
- '*'
env:
GITEA_REPO: git.duguying.net/duguying/runner-base
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
- linux/riscv64
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GITEA_REPO }}
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: git.duguying.net
username: ${{ vars.DOCKER_GITEA_USERNAME }}
password: ${{ secrets.DOCKER_GITEA_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,"name=${{ env.GITEA_REPO }}",push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
set -x #echo on
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v3
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v3
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
- name: Organize digests
run: |
set -x #echo on
mv /tmp/digests/*/* /tmp/digests
rm -rf /tmp/digests/digests-*
ls -al /tmp/digests
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: git.duguying.net
username: ${{ vars.DOCKER_GITEA_USERNAME }}
password: ${{ secrets.DOCKER_GITEA_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GITEA_REPO }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
set -x #echo on
echo "$DOCKER_METADATA_OUTPUT_JSON"
ls -al /tmp/digests
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.GITEA_REPO }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.GITEA_REPO }}:${{ steps.meta.outputs.version }}
Workflow logs
No response
BuildKit logs
Additional info
No response