mirror of
https://github.com/kerberos-io/agent.git
synced 2026-10-19 17:38:25 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20b6226ba3 | ||
|
|
aba07a4527 | ||
|
|
8a6b2da968 | ||
|
|
8240d7b9b0 | ||
|
|
36a234976f | ||
|
|
502c892e33 | ||
|
|
722b94d88f | ||
|
|
69be9eabeb | ||
|
|
af69d46c95 | ||
|
|
c114b3da5b | ||
|
|
e715575f20 | ||
|
|
b4cf49d4be | ||
|
|
d41c45ba59 |
@@ -54,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: agent-${{matrix.architecture}}.tar
|
name: agent-${{matrix.architecture}}.tar
|
||||||
path: agent-${{matrix.architecture}}.tar
|
path: agent-${{matrix.architecture}}.tar
|
||||||
|
|
||||||
build-arm64:
|
build-arm64:
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
permissions:
|
permissions:
|
||||||
@@ -92,9 +92,38 @@ jobs:
|
|||||||
name: agent-${{matrix.architecture}}.tar
|
name: agent-${{matrix.architecture}}.tar
|
||||||
path: agent-${{matrix.architecture}}.tar
|
path: agent-${{matrix.architecture}}.tar
|
||||||
|
|
||||||
|
build-darwin:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [amd64, arm64]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Build Darwin binary with Docker
|
||||||
|
run: |
|
||||||
|
docker build -f Dockerfile.cross \
|
||||||
|
--build-arg GOOS=darwin \
|
||||||
|
--build-arg GOARCH=${{matrix.architecture}} \
|
||||||
|
-t darwin-${{matrix.architecture}} .
|
||||||
|
CID=$(docker create darwin-${{matrix.architecture}})
|
||||||
|
docker cp ${CID}:/home/agent ./output-${{matrix.architecture}}
|
||||||
|
docker rm ${CID}
|
||||||
|
- name: Tar Darwin binary and clean
|
||||||
|
run: tar -cf agent-darwin-${{matrix.architecture}}.tar -C output-${{matrix.architecture}} . && rm -rf output-${{matrix.architecture}}
|
||||||
|
- name: Upload darwin artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: agent-darwin-${{matrix.architecture}}.tar
|
||||||
|
path: agent-darwin-${{matrix.architecture}}.tar
|
||||||
|
|
||||||
create-manifest:
|
create-manifest:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: [build-amd64, build-arm64]
|
needs: [build-amd64, build-arm64, build-darwin]
|
||||||
steps:
|
steps:
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|||||||
@@ -72,4 +72,40 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: agent-${{matrix.architecture}}.tar
|
name: agent-${{matrix.architecture}}.tar
|
||||||
path: agent-${{matrix.architecture}}.tar
|
path: agent-${{matrix.architecture}}.tar
|
||||||
|
|
||||||
|
build-darwin:
|
||||||
|
runs-on: macos-13
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [arm64]
|
||||||
|
steps:
|
||||||
|
- name: Setup Docker on macOS
|
||||||
|
uses: douglascamata/setup-docker-macos-action@v1.0.0
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- uses: benjlevesque/short-sha@v2.1
|
||||||
|
id: short-sha
|
||||||
|
with:
|
||||||
|
length: 7
|
||||||
|
- name: Build Darwin binary with Docker
|
||||||
|
run: |
|
||||||
|
docker build -f Dockerfile.arm64 \
|
||||||
|
-t darwin-${{matrix.architecture}} .
|
||||||
|
CID=$(docker create darwin-${{matrix.architecture}})
|
||||||
|
docker cp ${CID}:/home/agent ./output-${{matrix.architecture}}
|
||||||
|
docker rm ${CID}
|
||||||
|
- name: Tar Darwin binary and clean
|
||||||
|
run: tar -cf agent-darwin-${{matrix.architecture}}.tar -C output-${{matrix.architecture}} . && rm -rf output-${{matrix.architecture}}
|
||||||
|
- name: Upload darwin artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: agent-darwin-${{matrix.architecture}}.tar
|
||||||
|
path: agent-darwin-${{matrix.architecture}}.tar
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
|
|||||||
##################
|
##################
|
||||||
# Build Machinery
|
# Build Machinery
|
||||||
|
|
||||||
|
ARG GOOS=linux
|
||||||
|
ENV GOOS=${GOOS}
|
||||||
|
|
||||||
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
|
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
|
||||||
go mod download && \
|
go mod download && \
|
||||||
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \
|
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
|
|||||||
##################
|
##################
|
||||||
# Build Machinery
|
# Build Machinery
|
||||||
|
|
||||||
|
ARG GOOS=linux
|
||||||
|
ENV GOOS=${GOOS}
|
||||||
|
|
||||||
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
|
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
|
||||||
go mod download && \
|
go mod download && \
|
||||||
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \
|
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \
|
||||||
|
|||||||
Reference in New Issue
Block a user