Chore/update golang to 1.24 + add riscv64 support (#40)
* chg: chore: bump golang and deps * chg: chore: add riscv64 support * chg: chore: update goreleaser * chg: chore: disable cgo * chg: chore: tidy up deps * chg: chore: add build tags
This commit is contained in:
9
.github/workflows/pipeline.dockerfile
vendored
9
.github/workflows/pipeline.dockerfile
vendored
@@ -1,22 +1,23 @@
|
||||
#####################################################
|
||||
### Copy platform specific binary
|
||||
FROM bash as copy-binary
|
||||
FROM bash AS copy-binary
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
RUN echo "Target Platform = ${TARGETPLATFORM}"
|
||||
|
||||
COPY dist .
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then cp torrentindexer_linux_amd64_linux_amd64_v1/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/386" ]; then cp torrentindexer_linux_386_linux_386/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then cp torrentindexer_linux_arm64_linux_arm64/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/386" ]; then cp torrentindexer_linux_386_linux_386_sse2/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then cp torrentindexer_linux_arm64_linux_arm64_v8.0/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then cp torrentindexer_linux_arm_linux_arm_6/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then cp torrentindexer_linux_arm_linux_arm_7/torrent-indexer /torrent-indexer; fi
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/riscv64" ]; then cp torrentindexer_linux_riscv64_linux_riscv64_rva20u64/torrent-indexer /torrent-indexer; fi
|
||||
RUN chmod +x /torrent-indexer
|
||||
|
||||
|
||||
#####################################################
|
||||
### Build Final Image
|
||||
FROM alpine as release
|
||||
FROM alpine AS release
|
||||
LABEL maintainer="felipevm97@gmail.com"
|
||||
|
||||
COPY --from=copy-binary /torrent-indexer /app/
|
||||
|
||||
8
.github/workflows/pipeline.yml
vendored
8
.github/workflows/pipeline.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
go-lint:
|
||||
name: Lint Go code
|
||||
runs-on: ubuntu-latest
|
||||
container: golang:1.22
|
||||
container: golang:1.24
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
go:
|
||||
name: Test Go code
|
||||
runs-on: ubuntu-latest
|
||||
container: golang:1.22
|
||||
container: golang:1.24
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
name: Build binaries
|
||||
needs: [go, go-lint]
|
||||
runs-on: ubuntu-latest
|
||||
container: goreleaser/goreleaser:v1.25.1
|
||||
container: goreleaser/goreleaser:v2.11.1
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -153,6 +153,6 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: .github/workflows/pipeline.dockerfile
|
||||
platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64,linux/riscv64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
Reference in New Issue
Block a user