Compare commits
1 Commits
b5ef107f9c
..
v0.1.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 388e24a8df |
@@ -68,13 +68,23 @@ jobs:
|
|||||||
"${{ github.server_url }}/api/packages/${{ github.repository_owner }}/alpine/edge/main"
|
"${{ github.server_url }}/api/packages/${{ github.repository_owner }}/alpine/edge/main"
|
||||||
|
|
||||||
build-and-push-docker:
|
build-and-push-docker:
|
||||||
needs: build-apk
|
|
||||||
runs-on:
|
runs-on:
|
||||||
- ubuntu-24.04
|
- ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: src/go.mod
|
||||||
|
|
||||||
|
- name: Cross-compile binaries
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o ../out/amd64/ax .
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -trimpath -o ../out/arm64/ax .
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -88,18 +98,10 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Extract version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
|
||||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
build-args: |
|
|
||||||
VERSION=${{ steps.version.outputs.version }}
|
|
||||||
tags: "g.eliaskohout.de/eliaskohout/axolotl-server:${{gitea.ref_name}},g.eliaskohout.de/eliaskohout/axolotl-server:latest"
|
tags: "g.eliaskohout.de/eliaskohout/axolotl-server:${{gitea.ref_name}},g.eliaskohout.de/eliaskohout/axolotl-server:latest"
|
||||||
|
|||||||
+3
-7
@@ -1,14 +1,10 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG VERSION
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN apk --no-cache add ca-certificates && \
|
RUN apk --no-cache add ca-certificates
|
||||||
ARCH=$([ "$TARGETARCH" = "arm64" ] && echo aarch64 || echo x86_64) && \
|
|
||||||
wget -q "https://g.eliaskohout.de/api/packages/eliaskohout/alpine/edge/main/${ARCH}/axolotl-${VERSION}-r0.apk" \
|
COPY out/${TARGETARCH}/ax /usr/local/bin/ax
|
||||||
-O /tmp/axolotl.apk && \
|
|
||||||
apk add --no-cache --allow-untrusted /tmp/axolotl.apk && \
|
|
||||||
rm /tmp/axolotl.apk
|
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
EXPOSE 7000
|
EXPOSE 7000
|
||||||
|
|||||||
Reference in New Issue
Block a user