mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
fixup docker CI
This commit is contained in:
parent
c963d1773b
commit
cc703cd70d
5 changed files with 20 additions and 72 deletions
13
.github/workflows/always.yml
vendored
13
.github/workflows/always.yml
vendored
|
|
@ -6,20 +6,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.0
|
go-version: 1.23.0
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: deps
|
|
||||||
run: npm i -g standard
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Run
|
- name: Run
|
||||||
run: make ci
|
run: make ci
|
||||||
|
|
||||||
|
|
|
||||||
28
.github/workflows/deploy.yml
vendored
28
.github/workflows/deploy.yml
vendored
|
|
@ -10,33 +10,25 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: 1.23.0
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1.2.0
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1.6.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and release on dockerhub
|
- name: Build and release on dockerhub
|
||||||
uses: docker/build-push-action@v2.7.0
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
file: support/build.Dockerfile
|
file: support/build.Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
|
@ -47,17 +39,19 @@ jobs:
|
||||||
run: make build-all
|
run: make build-all
|
||||||
|
|
||||||
- name: "Release gh release versioned"
|
- name: "Release gh release versioned"
|
||||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
artifacts: "builds/*"
|
artifacts: "builds/*"
|
||||||
|
bodyFile: "builds/buildout"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: "Release gh release latest"
|
- name: "Release gh release latest"
|
||||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: latest
|
tag: latest
|
||||||
name: Latest
|
name: Latest
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
artifacts: "builds/*"
|
artifacts: "builds/*"
|
||||||
|
bodyFile: "builds/buildout"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
39
.github/workflows/rc.yml
vendored
39
.github/workflows/rc.yml
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
name: rc
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'rc/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: 1.23.0
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Run
|
|
||||||
run: make ci
|
|
||||||
|
|
||||||
- name: Build all artifacts
|
|
||||||
run: make build-all
|
|
||||||
|
|
||||||
- name: "Release gh release prerelease"
|
|
||||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
|
||||||
with:
|
|
||||||
allowUpdates: true
|
|
||||||
prerelease: true
|
|
||||||
tag: "rc"
|
|
||||||
artifacts: "builds/*"
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -17,10 +17,7 @@ run-ro::
|
||||||
run-extra::
|
run-extra::
|
||||||
./gossa -verb=true -prefix="/fancy-path/" -k=false -symlinks=true test-fixture
|
./gossa -verb=true -prefix="/fancy-path/" -k=false -symlinks=true test-fixture
|
||||||
|
|
||||||
lint-js::
|
ci:: build-all test
|
||||||
standard
|
|
||||||
|
|
||||||
ci:: build-all test lint-js
|
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
test::
|
test::
|
||||||
|
|
@ -66,7 +63,7 @@ build-all:: build
|
||||||
${NOCGO} GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o builds/gossa-mac-x64
|
${NOCGO} GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o builds/gossa-mac-x64
|
||||||
${NOCGO} GOOS=darwin GOARCH=arm64 go build ${FLAGS} -o builds/gossa-mac-arm64
|
${NOCGO} GOOS=darwin GOARCH=arm64 go build ${FLAGS} -o builds/gossa-mac-arm64
|
||||||
${NOCGO} GOOS=windows GOARCH=amd64 go build ${FLAGS} -o builds/gossa-windows.exe
|
${NOCGO} GOOS=windows GOARCH=amd64 go build ${FLAGS} -o builds/gossa-windows.exe
|
||||||
sha256sum builds/*
|
sha256sum builds/* | tee builds/buildout
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
rm -f gossa
|
rm -f gossa
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
FROM golang:1.23.0 AS builder
|
FROM golang:1.23.0-alpine AS builder
|
||||||
|
RUN apk add --no-cache make
|
||||||
WORKDIR /gossaSrc
|
WORKDIR /gossaSrc
|
||||||
COPY . /gossaSrc
|
COPY . /gossaSrc
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.20
|
FROM alpine:3.20
|
||||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false" VERB="false"
|
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false" VERB="false"
|
||||||
COPY --from=builder /gossaSrc/gossa /gossa
|
COPY --from=builder /gossaSrc/gossa /gossa
|
||||||
RUN addgroup -g ${GID} user \
|
RUN addgroup -g ${GID} user \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue