mirror of
				https://github.com/grassrootseconomics/cic-custodial.git
				synced 2025-11-04 02:41:19 +01:00 
			
		
		
		
	ci: add release, package checks, deepsource
This commit is contained in:
		
							parent
							
								
									fb2091da17
								
							
						
					
					
						commit
						178fd7e154
					
				
							
								
								
									
										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: "weekly"
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
 | 
			
		||||
      - 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 }}
 | 
			
		||||
							
								
								
									
										29
									
								
								.goreleaser.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.goreleaser.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,29 @@
 | 
			
		||||
builds:
 | 
			
		||||
  - env:
 | 
			
		||||
      - CGO_ENABLED=0
 | 
			
		||||
    goos:
 | 
			
		||||
      - linux
 | 
			
		||||
    goarch:
 | 
			
		||||
      - amd64
 | 
			
		||||
    main: ./cmd/service
 | 
			
		||||
    ldflags:
 | 
			
		||||
      - -s -w
 | 
			
		||||
 | 
			
		||||
archives:
 | 
			
		||||
  - format: tar.gz
 | 
			
		||||
    files:
 | 
			
		||||
      - LICENSE
 | 
			
		||||
      - config.toml
 | 
			
		||||
 | 
			
		||||
dockers:
 | 
			
		||||
  - goos: linux
 | 
			
		||||
    goarch: amd64
 | 
			
		||||
    ids:
 | 
			
		||||
    - cic-dw
 | 
			
		||||
    image_templates:
 | 
			
		||||
    - "ghcr.io/grassrootseconomics/cic-custodial/cic-custodial:latest"
 | 
			
		||||
    - "ghcr.io/grassrootseconomics/cic-custodial/cic-custodial:{{ .Tag }}"
 | 
			
		||||
    dockerfile: Dockerfile
 | 
			
		||||
    extra_files:
 | 
			
		||||
    - config.toml
 | 
			
		||||
  
 | 
			
		||||
							
								
								
									
										13
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
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-custodial
 | 
			
		||||
 | 
			
		||||
COPY cic-custodial .
 | 
			
		||||
COPY config.toml .
 | 
			
		||||
 | 
			
		||||
EXPOSE 5000
 | 
			
		||||
CMD ["./cic-dw"]
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user