Merge pull request #7258 from AkihiroSuda/fix-7255
This commit is contained in:
commit
d7c952a053
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@ -53,18 +53,24 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build Release Binaries
|
name: Build Release Binaries
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-${{ matrix.ubuntu }}
|
||||||
needs: [check]
|
needs: [check]
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04]
|
include:
|
||||||
platform:
|
# Choose an old release of Ubuntu to avoid glibc issue https://github.com/containerd/containerd/issues/7255
|
||||||
- linux/amd64
|
- ubuntu: 18.04
|
||||||
- linux/arm64
|
platform: linux/amd64
|
||||||
- linux/ppc64le
|
- ubuntu: 18.04
|
||||||
- linux/riscv64
|
platform: linux/arm64
|
||||||
- windows/amd64
|
- ubuntu: 18.04
|
||||||
|
platform: linux/ppc64le
|
||||||
|
# riscv64 isn't supported by Ubuntu 18.04
|
||||||
|
- ubuntu: 22.04
|
||||||
|
platform: linux/riscv64
|
||||||
|
- ubuntu: 18.04
|
||||||
|
platform: windows/amd64
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
@ -73,7 +79,7 @@ jobs:
|
|||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
MOS: ${{ matrix.os }}
|
MOS: ubuntu-${{ matrix.ubuntu }}
|
||||||
run: |
|
run: |
|
||||||
releasever=${{ github.ref }}
|
releasever=${{ github.ref }}
|
||||||
releasever="${releasever#refs/tags/}"
|
releasever="${releasever#refs/tags/}"
|
||||||
@ -105,7 +111,7 @@ jobs:
|
|||||||
export PREFIX_LEN=12
|
export PREFIX_LEN=12
|
||||||
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
|
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
|
||||||
fi
|
fi
|
||||||
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
|
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
|
||||||
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
|
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
|
||||||
|
|
||||||
# Remove symlinks since we don't want these in the release Artifacts
|
# Remove symlinks since we don't want these in the release Artifacts
|
||||||
|
6
.github/workflows/release/Dockerfile
vendored
6
.github/workflows/release/Dockerfile
vendored
@ -12,7 +12,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
ARG UBUNTU_VERSION=22.04
|
# UBUNTU_VERSION can be set to 18.04 (bionic), 20.04 (focal), or 22.04 (jammy)
|
||||||
|
ARG UBUNTU_VERSION=18.04
|
||||||
ARG BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
|
ARG BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
|
||||||
ARG GO_VERSION
|
ARG GO_VERSION
|
||||||
ARG GO_IMAGE=golang:${GO_VERSION}
|
ARG GO_IMAGE=golang:${GO_VERSION}
|
||||||
@ -25,7 +26,8 @@ SHELL ["/bin/bash", "-xec"]
|
|||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y dpkg-dev git make pkg-config
|
apt-get install -y dpkg-dev git make pkg-config
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
RUN xx-apt-get install -y libseccomp-dev libbtrfs-dev gcc
|
RUN xx-apt-get install -y libseccomp-dev btrfs-progs gcc
|
||||||
|
RUN if grep -qE 'UBUNTU_CODENAME=(focal|jammy)' /etc/os-release; then xx-apt-get install -y libbtrfs-dev; fi
|
||||||
ENV PATH=/usr/local/go/bin:$PATH
|
ENV PATH=/usr/local/go/bin:$PATH
|
||||||
ENV GOPATH=/go
|
ENV GOPATH=/go
|
||||||
ENV CGO_ENABLED=1
|
ENV CGO_ENABLED=1
|
||||||
|
Loading…
Reference in New Issue
Block a user