Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reddec committed Jul 7, 2021
0 parents commit f2dc147
Show file tree
Hide file tree
Showing 60 changed files with 5,864 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Dockerfile*
*.go
Makefile
/.idea
/ssl
/git-pipe
/backups
/repos
/dist
/build
/_docs
*.md
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['http://reddec.net/about/#donate']
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build tools
on:
push:
tags:
- 'v*'
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '^1.16'
id: go
- name: Install deps
run: sudo apt install -y python3 pandoc make

- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0
- name: Checkout LFS objects
run: git lfs checkout

- name: Pull tag
run: git fetch --tags
- name: Build doc
run: make man
- uses: azure/docker-login@v1
with:
username: 'reddec'
password: ${{ secrets.DOCKERIO_PASSWORD }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --release-footer _footer.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.idea
/ssl
/git-pipe
/backups
/repos
/dist
/build
21 changes: 21 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
run:
tests: false

linters:
disable:
- lll
- godot
- gci
- wsl
- tagliatelle
- exhaustivestruct
- nakedret
- maligned
- gofumpt
- nlreturn
- cyclop
- wrapcheck
enable-all: true
linters-settings:
funlen:
lines: 80
87 changes: 87 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
project_name: git-pipe
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 5
- 6
- 7
flags:
- -trimpath
goos:
- linux
- darwin
- windows
main: ./cmd/git-pipe
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
Linux: linux
homepage: https://github.com/reddec/git-pipe
maintainer: Baryshnikov Aleksandr <owner@reddec.net>
description: Watch and run git repositories with docker or docker-compose setup
license: Mozilla Public License Version 2.0
contents:
- src: build/git-pipe.1.gz
dst: /usr/local/share/man/man1/git-pipe.1.gz
formats:
- deb
dependencies:
- git
recommends:
- openssl
- openssh-client
suggests:
- docker-compose
- docker.io
dockers:
- dockerfile: Dockerfile
image_templates:
- "reddec/{{ .ProjectName }}:{{ .Tag }}"
- "reddec/{{ .ProjectName }}:v{{ .Major }}"
- "reddec/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
- "reddec/{{ .ProjectName }}:latest"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- dockerfile: Dockerfile.light
image_templates:
- "reddec/{{ .ProjectName }}:{{ .Tag }}-light"
- "reddec/{{ .ProjectName }}:v{{ .Major }}-light"
- "reddec/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-light"
- "reddec/{{ .ProjectName }}:light"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
archives:
- files:
- LICENSE
- README.md
format: tar.gz
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^doc:'
- '^test:'
- '^build:'
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.14
VOLUME /app/backups /app/repos /app/ssl
WORKDIR /app
EXPOSE 80 443
ENV BIND=0.0.0.0:80 DOMAIN=localhost BACKUP=file:///app/backups
RUN apk add --no-cache git docker-cli docker-compose openssl openssh-client && \
mkdir -p /root/.ssh && \
echo -e 'Host *\n\tUserKnownHostsFile=/dev/null\n\tStrictHostKeyChecking no' > /root/.ssh/config && \
chmod 400 /root/.ssh
ADD git-pipe ./git-pipe
ENTRYPOINT ["/app/git-pipe"]
11 changes: 11 additions & 0 deletions Dockerfile.light
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.14
VOLUME /app/backups /app/repos /app/ssl
WORKDIR /app
EXPOSE 80 443
ENV BIND=0.0.0.0:80 DOMAIN=localhost BACKUP=file:///app/backups
RUN apk add --no-cache git docker-cli openssl openssh-client && \
mkdir -p /root/.ssh && \
echo -e 'Host *\n\tUserKnownHostsFile=/dev/null\n\tStrictHostKeyChecking no' > /root/.ssh/config && \
chmod 400 /root/.ssh
ADD git-pipe ./git-pipe
ENTRYPOINT ["/app/git-pipe"]
Loading

0 comments on commit f2dc147

Please sign in to comment.