feat(ci): add CD/CI pipelines

- Enable Dependabot
- Run build/test pipelines
- Add GoReleaser release/nightly pipelines
- Add lint pipelines
This commit is contained in:
Ayman Bagabas
2023-07-13 11:07:02 -04:00
parent 79edec1f07
commit 03fd12059d
9 changed files with 190 additions and 0 deletions

12
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
name: build
on: [push, pull_request]
jobs:
build:
uses: charmbracelet/meta/.github/workflows/build.yml@main
snapshot:
uses: charmbracelet/meta/.github/workflows/snapshot.yml@main
secrets:
goreleaser_key: ${{ secrets.GORELEASER_KEY }}

24
.github/workflows/goreleaser.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: goreleaser
on:
push:
tags:
- v*.*.*
concurrency:
group: goreleaser
cancel-in-progress: true
jobs:
goreleaser:
uses: charmbracelet/meta/.github/workflows/goreleaser.yml@main
secrets:
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_token: ${{ secrets.DOCKERHUB_TOKEN }}
gh_pat: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
goreleaser_key: ${{ secrets.GORELEASER_KEY }}
fury_token: ${{ secrets.FURY_TOKEN }}
nfpm_gpg_key: ${{ secrets.NFPM_GPG_KEY }}
nfpm_passphrase: ${{ secrets.NFPM_PASSPHRASE }}
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

21
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: lint
on:
push:
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ^1
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: golangci-lint command line arguments.
args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true

14
.github/workflows/nightly.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: nightly
on:
push:
branches:
- main
jobs:
nightly:
uses: charmbracelet/meta/.github/workflows/nightly.yml@main
secrets:
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_token: ${{ secrets.DOCKERHUB_TOKEN }}
goreleaser_key: ${{ secrets.GORELEASER_KEY }}