Compare commits
2 Commits
973e0a3dbd
...
d6fdd4ab96
| Author | SHA1 | Date | |
|---|---|---|---|
| d6fdd4ab96 | |||
| bc8bbf9df2 |
36
.github/workflows/main.yaml
vendored
Normal file
36
.github/workflows/main.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Main workflow
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build sogogi
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install docker
|
||||
uses: actions/docker-install@v1
|
||||
|
||||
- name: Login to registry
|
||||
uses: actions/docker-login@v2
|
||||
with:
|
||||
registry: git.mug.lv
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Setup buildx
|
||||
uses: actions/docker-setup-buildx@v2
|
||||
|
||||
- name: Build image
|
||||
uses: actions/docker-build-push@v4
|
||||
with:
|
||||
push: ${{ github.ref_name == 'main' }}
|
||||
tags: git.mug.lv/${{ github.repository }}:${{ github.ref_name }}
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM golang:1.19-alpine AS build
|
||||
|
||||
RUN go install codeberg.org/emersion/sogogi@fa03f654894488c0fc6e2816447ddbda1d6cd8c3
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add -U --no-cache tini && \
|
||||
addgroup -g 1000 sogogi && \
|
||||
adduser -h /var/lib/empty -G sogogi -s /bin/ash -D -H -u 1000 sogogi
|
||||
|
||||
COPY --from=build /go/bin/sogogi /usr/local/bin/sogogi
|
||||
|
||||
USER 1000
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/sogogi"]
|
||||
CMD ["-config", "/etc/sogogi.scfg"]
|
||||
Reference in New Issue
Block a user