ci: supporting riscv64

This commit is contained in:
criyle 2023-07-21 07:31:38 +00:00
parent 5d037c73ef
commit 185c73bed5
3 changed files with 27 additions and 3 deletions

View File

@ -9,7 +9,6 @@ jobs:
goreleaser:
name: Goreleaser
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'v') }}
steps:
-
name: Checkout
@ -39,6 +38,7 @@ jobs:
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
if: ${{ contains(github.ref, 'v') }}
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
@ -46,6 +46,15 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Test GoReleaser
uses: goreleaser/goreleaser-action@v3
if: ${{ ! contains(github.ref, 'v') }}
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --snapshot --clean
build:
name: Build-${{ matrix.os }}-${{ matrix.GOARCH }}
runs-on: ${{ matrix.os }}
@ -64,6 +73,8 @@ jobs:
GOARCH: "arm"
- os: ubuntu-latest
GOARCH: "arm64"
- os: ubuntu-latest
GOARCH: "riscv64"
- os: macos-latest
GOARCH: "arm64"
steps:

View File

@ -20,6 +20,7 @@ builds:
- amd64
- arm
- arm64
- riscv64
goarm:
- "6"
- "7"
@ -82,17 +83,29 @@ dockers:
- "mount.yaml"
build_flag_templates:
- "--platform=linux/arm/v7"
# Debian is not supporting riscv64 on stable branch, skip it first
# - image_templates:
# - "criyle/executorserver:{{ .Tag }}-riscv64"
# use: buildx
# dockerfile: "Dockerfile.goreleaser"
# goarch: riscv64
# extra_files:
# - "mount.yaml"
# build_flag_templates:
# - "--platform=linux/riscv64"
docker_manifests:
- name_template: "criyle/executorserver:{{ .Tag }}"
image_templates:
- "criyle/executorserver:{{ .Tag }}-amd64"
- "criyle/executorserver:{{ .Tag }}-arm64"
- "criyle/executorserver:{{ .Tag }}-arm"
# - "criyle/executorserver:{{ .Tag }}-riscv64"
- name_template: "criyle/executorserver:latest"
image_templates:
- "criyle/executorserver:{{ .Tag }}-amd64"
- "criyle/executorserver:{{ .Tag }}-arm64"
- "criyle/executorserver:{{ .Tag }}-arm"
# - "criyle/executorserver:{{ .Tag }}-riscv64"
skip_push: auto
checksum:
name_template: "checksums.txt"

View File

@ -1,4 +1,4 @@
FROM ubuntu
FROM debian:latest
WORKDIR /opt
ENTRYPOINT [ "/opt/executorserver" ]
COPY executorserver mount.yaml /opt/
COPY executorserver mount.yaml /opt/