mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-28 12:56:35 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
382b2e3734 | ||
|
|
a1613a08e8 | ||
|
|
99ac521aa8 | ||
|
|
f1dc8280f5 |
@@ -1,4 +1,4 @@
|
||||
name: ci
|
||||
name: always
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
@@ -6,10 +6,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.17.3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.17.3
|
||||
go-version: 1.19.1
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -14,6 +14,12 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.19.1
|
||||
id: go
|
||||
|
||||
- name: Set env
|
||||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
||||
|
||||
@@ -29,7 +35,7 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
- name: Build and release on dockerhub
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
file: support/build.Dockerfile
|
||||
@@ -37,3 +43,21 @@ jobs:
|
||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
tags: pldubouilh/gossa:latest,pldubouilh/gossa:${{github.ref_name}}
|
||||
|
||||
- name: Build all artifacts
|
||||
run: make build-all
|
||||
|
||||
- name: "Release gh release versioned"
|
||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts: "builds/*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Release gh release latest"
|
||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
|
||||
with:
|
||||
tag: latest
|
||||
name: Latest
|
||||
allowUpdates: true
|
||||
artifacts: "builds/*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
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.19.1
|
||||
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 }}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
FROM golang:latest as builder
|
||||
FROM golang:1.18 as builder
|
||||
COPY . /gossaSrc
|
||||
RUN cd /gossaSrc && make
|
||||
|
||||
FROM alpine
|
||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false"
|
||||
EXPOSE 8001
|
||||
FROM alpine:3.15
|
||||
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"
|
||||
RUN apk add --no-cache su-exec
|
||||
COPY ./support/entrypoint.sh /entrypoint.sh
|
||||
COPY --from=builder /gossaSrc/gossa /gossa
|
||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
ENTRYPOINT "/entrypoint.sh"
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} --verb=${VERB} ${DATADIR}
|
||||
+2
-2
@@ -3,9 +3,9 @@ Description=Gossa service for mytestfolder
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
# note: its better to use absolute paths here
|
||||
# note: absolute paths are necessary here
|
||||
[Service]
|
||||
ExecStart=gossa /home/joe/mytestfolder
|
||||
ExecStart=/usr/bin/gossa /home/joe/mytestfolder
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
|
||||
Reference in New Issue
Block a user