GithubHelp home page GithubHelp logo

forestry's Introduction

go-template

Unit Test Lint Go PkgGoDev

This repository is template repository for golang developper in Saisho labo.

Getting Started

Rename Paramerters

  1. Push use this template button in this repository.
  2. Rename variables for your application. Here's the startup script.
(
    export APPLICATION=your-application-name
    export USER=your-user-name
    export REPOSITORY=$USER/$APPLICATION
    grep -l 'hello' Dockerfile .github/workflows/*.yaml | xargs sed -i.bak -e "s/hello/$APPLICATION/g"
    grep -l 'sai-lab/forestry' * | xargs sed -i.bak -e "s@sai-lab/forestry@$REPOSITORY@g"
    mv cmd/hello cmd/$APPLICATION
)

Setup Container Registry

  1. Get your token for Github Packages. User > Settings > Developper Settins > Personal access tokens > Generate new token Check write:packages and delete:packages after click Generate token.
  2. Copy your token and paste the token set your repository secret variables (name: CR_PAT). Access Your Repository > Settings > Secrets > New Secrets

Docker Build in Local

docker build -t ghcr.io/your-user-name/your-application-name .

Running on Docker

docker run ghcr.io/your-user-name/your-application-name

Local Build

make build

CI

  • Lint (go vet, golangci-lint)
  • Unit Tests
  • Publish library documents
  • Build and push container image to ghcr.io
  • Vulnerability scanning in container image

Lint

Analysis your code staticly when each push.

tools

  • go vet
  • golangci-lint

Publish library documents

Your application documents is generated by GitHub actions when your application released (ref: http://pkg.go.dev).

Build and push container image to ghcr.io

Build and push container image when you tagged a commit. Container image tag format is ghcr.io/{{ owner }}/{{ application }}:{{ version }}.

Vulnerability scanning in container image

Scan Container image when each commits. If vulnerabilities are found, send alert message to your PR.

License

Put your application license.

forestry's People

Contributors

guni1192 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.