mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-11-22 07:46:46 +01:00
add: ci integration
This commit is contained in:
parent
df4f188807
commit
ed0802d2be
9
.deepsource.toml
Normal file
9
.deepsource.toml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
version = 1
|
||||||
|
|
||||||
|
[[analyzers]]
|
||||||
|
name = "go"
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[analyzers.meta]
|
||||||
|
import_root = "github.com/grassrootseconomics/cic-custodial"
|
||||||
|
|
6
.github/dependabot.yaml
vendored
Normal file
6
.github/dependabot.yaml
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
35
.github/workflows/release.yaml
vendored
Normal file
35
.github/workflows/release.yaml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: goreleaser
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.19.3
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: --parallelism 1 --rm-dist --skip-validate
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
33
.goreleaser
Normal file
33
.goreleaser
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./cmd
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- format: tar.gz
|
||||||
|
files:
|
||||||
|
- LICENSE
|
||||||
|
- config.toml
|
||||||
|
- queries.sql
|
||||||
|
- migrations/*
|
||||||
|
|
||||||
|
dockers:
|
||||||
|
- goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
ids:
|
||||||
|
- cic-chain-events
|
||||||
|
image_templates:
|
||||||
|
- "ghcr.io/grassrootseconomics/cic-chain-events/cic-chain-events:latest"
|
||||||
|
- "ghcr.io/grassrootseconomics/cic-chain-events/cic-chain-events:{{ .Tag }}"
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
extra_files:
|
||||||
|
- LICENSE
|
||||||
|
- config.toml
|
||||||
|
- queries.sql
|
||||||
|
- migrations/*
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM debian:11-slim
|
||||||
|
|
||||||
|
RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
ca-certificates && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /cic-chain-events
|
||||||
|
|
||||||
|
COPY cic-chain-events .
|
||||||
|
COPY config.toml .
|
||||||
|
COPY queries.sql .
|
||||||
|
COPY LICENSE .
|
||||||
|
COPY migrations migrations/
|
||||||
|
|
||||||
|
CMD ["./cic-chain-events"]
|
Loading…
Reference in New Issue
Block a user