Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
up and running

add Makefile and readme

github actions implemented

remove debugging logs

zap used as logger

set headers as seperate function

ci/cd improvements

remove release.yml

revert lint in Makefile

add upload assets step

fix filename

add upload assets again

add project name

retrigger pipeline

use plag library

fixes #1: demo commit to test auto close

fixes #2: proper directory structure

change filename

add vendor folder to gitignore

dummy commit to test commit speed

upgrade golang version

bump go-version on github actions

remove unneccessary log

use logger.Fatal instead of panic()

remove unneccessary variables

add docker pulls badge

fix #3: banner created

fixes #4: unit testing

print response body on error while creating user

exclude windows-latest from unit tests temporarily

use variables from non-test class

fix variable usage

go report improvements

fix lint error

fix goreport errors

go mod vendor before ineffassign

remove banner

fixes #8: multiple email domains added, readme updated

fix test errors

fixes #6: options managed as struct

remove unneccessary logger initialization

fix registration problem with the new API

fixes #10

upgrade dependencies

fix option parsing

upgrade deps

update makefile

exclude go 1.15.x from test/build

banner created

remove test-cache phase

change pkg to internal

add pre-commit

pre-commit-config added

pre-commit-config added

update readme

codecov

use distroless as minimal base image

add codecov to actions

modify actions

coverage

order

hardcode commands

readme badge order

update readme

update readme

formatting

update readme

update badges

Create LICENSE

update precommit conf

remove debug logs

configure zap

upgrade deps

add codeql action

fix unit tests a little bit

fix random package unit tests

upgrade deps

format

function comment headers added for missing ones

upgrade tool versions, #minor

upgrade indirect dependencies

upgrade git-tag-action

refactor logging and stuff

change if/else conditions with global vars

new line on first log

fix wrong new line

set api url as function level variable

add newline on banner.txt instead of main.go

set variable types

handle one more error condition

add test case for broken api url

fix goreport warnings

test broken json response case

re-order test functions

start using testify/assert while testing

use mock server while testing bad request from API

fix sonarcloud warnings

sonarcloud integration

add sonarcloud badge

try to display coverage info on UI

change file names to match sonarcloud configuration

remove windows from github actions

remove windows from goreleaser config

regenerate go.sum

remove unneccessary variable assignments

upgrade multiple deps

add dependabot.yml

upgrade direct deps and pre-commit-hooks

remove unneccassary global variable def

regenerate go.sum

direct dependency upgrade script in Makefile

update pre-commit conf

enhance github workflows

cobra POC, to be continued

fix failing github actions

update readme

[skip ci] update readme

restructure

add sonar.coverage.exclusions

update sonar scanner config

exclude paths

add comment feature for codecov

add coverage step to pr.yml

update random.go

revert

fix codeql problem

fix coverage problem

remove comment block from codecov.yml

test invalid generate length

update codecov.yml

upgrade go version as 1.17

codecov removed

codecov removed (#24)

[skip ci] add commitMessage prefix for dependabot

upgrade direct deps to test notification behavior on new release

remove commitMessage prefix for dependabot

Bump go.uber.org/zap from 1.20.0 to 1.21.0 (#25) (#26)

Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](uber-go/zap@v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump go.uber.org/zap from 1.20.0 to 1.21.0 (#25)

Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](uber-go/zap@v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

change dependabot target branch

auto approve dependabot prs into devel

style: reformat files and its contents (#27)

* reformat files

* upgrade direct deps

style: change auto-merge file name (#29)

* reformat files

* upgrade direct deps

* Bump github.com/stretchr/testify from 1.7.0 to 1.7.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: change auto-merge file name

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

style: add new line to test pull request behavior (#30)

* reformat files

* upgrade direct deps

* Bump github.com/stretchr/testify from 1.7.0 to 1.7.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: change auto-merge file name

* style: newline added to test merge behavior

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

style: add new changes (#31)

* reformat files

* upgrade direct deps

* Bump github.com/stretchr/testify from 1.7.0 to 1.7.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: change auto-merge file name

* style: newline added to test merge behavior

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

reformat files

upgrade direct deps

Bump github.com/stretchr/testify from 1.7.0 to 1.7.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

style: change auto-merge file name

style: newline added to test merge behavior

build: fail pipeline if sonar quality gate fails

style: new line

style: another new line

style: new line

style: another new line

style: remove new lines

test: remove unneccessary debugging logs

update goreleaser

docs: add homebrew section

build: add new token for tap

Merge pull request #36 from bilalcaliskan/devel

build: add new token for tap

feat: automaxprocs added as dependency for POC

style: remove unneccessary comment line

feat: automaxprocs added as dependency for POC

style: remove unneccessary comment line

docs: add pre-commit install section

chore: upgrade direct deps

ci: goreleaser docker build

ci: disable quality gate check temp

ci: remove wrong dockerfile

ci: comment out needs statement

build: fix dockerfile

build: fix base image

ci: refactor flow

ci: comment out tag step

ci: comment out tag step

ci: customize goreleaser

ci: re-enable devel branch push

ci(goreleaser): remove wrong before hook

ci: add vendor command

ci: add vendor command

ci: modify goreleaser config

build: modify goreleaser conf

ci: re-enable tag job

ci: fix missing dependency problem

chore: add Dockerfile for manual build on localhost

build: re-enable all steps

ci: remove unneccassary jobs in push.yml

ci: remove golangci-lint configuration

chore: upgrade direct deps

ci: upgrade action plugin vertsions

build: upgrade action plugins versions

chore: upgrade direct deps

chore: upgrade deps based on dependabot alerts

chore: create build directory and collect ci/packaging related stuff in there

fix(#45): show banner on different types of installations(docker, binary, homebrew)

chore: upgrade all direct deps

style: remove wrong layer on Dockerfile.goreleaser

ci: add another exclude statement for changelog generator (style)

chore: change default banner file path

build: override bannerFilePath argument

chore: upgrade direct deps

build: add additional files into archive

build: add banner properly

chore: change location of Makefile

ci: fix file Makefile paths on CI jobs

fix: fix Makefile rendering problem

build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.5

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.2...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: upgrade indirect dependencies

chore: modify logging

docs: modify readme

chore: upgrade direct deps

feat: add version info

feat: add log verbosity support

style: remove debugging lines

feat: add coverage.sh

ci: ensure b flag is passed to make command

feat: add dependabot for github actions

build(deps): bump dependabot/fetch-metadata from 1.1.1 to 1.3.3

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.1.1 to 1.3.3.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](dependabot/fetch-metadata@v1.1.1...v1.3.3)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump goreleaser/goreleaser-action from 2 to 3

Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](goreleaser/goreleaser-action@v2...v3)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

ci: comment out if condition on auto update

revert: revert if condition on auto merge configuration

chore: bump golang version as 1.19

feat: add more build related environment into logging

chore: bump golangci-lint action version

ci: try to fix github actions problems

ci: change cron schedule of stale job

ci: install ineffassign with go get

ci: add errcheck

docs: bump golang version

ci: makefile improvements

ci: tidy makefile

ci: fix makefile errors

ci: fix target name for sonarcloud test

ci: move .revive.toml into build/ci directory

ci: get go version from go.mod file

build(deps): bump anothrNick/github-tag-action from 1.39.0 to 1.41.0

Bumps [anothrNick/github-tag-action](https://github.com/anothrNick/github-tag-action) from 1.39.0 to 1.41.0.
- [Release notes](https://github.com/anothrNick/github-tag-action/releases)
- [Commits](anothrNick/github-tag-action@1.39.0...1.41.0)

---
updated-dependencies:
- dependency-name: anothrNick/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

ci: add gosec action

build(deps): bump anothrNick/github-tag-action from 1.41.0 to 1.46.0

Bumps [anothrNick/github-tag-action](https://github.com/anothrNick/github-tag-action) from 1.41.0 to 1.46.0.
- [Release notes](https://github.com/anothrNick/github-tag-action/releases)
- [Commits](anothrNick/github-tag-action@1.41.0...1.46.0)

---
updated-dependencies:
- dependency-name: anothrNick/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

style: change banner

refactor: get read of new line at the end of errors.wrapf

build(deps): bump actions/stale from 5 to 6

Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

feat: set log level as seperate param

fix: proper random generation

chore: upgrade direct deps

feat: create temp mail over mailslurp

chore: bump multiple github action versions

feat: create tempmails over 1secmail

refactor: handle error on response body close ops

test: increase coverage by covering cmd/root.go

ci: only ignore main.go on sonar properties

test: fix unhandled errors

chore: increase --attempCount default value

feat: first skeleton of retryable menu

feat: add promptui for retryable error handling

test: pass missing param to disable interactive menu

ci: disable quality gate check temporarily

ci: pass CI jobss

fix: get rid of buggy validation prompt

style: proper logging on error

ci: re-enable sonarqube quality check

chore: replace logger as sugaredlogger

test: fix wrong attemptCount

refactor: fix golangci-lint warnings

build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

fix: use registerable new domains over different API

debug: print token

debug: print token

ci: pass secret value into jobs

initial commit 2

docs: remove banners
  • Loading branch information
joshsagredo committed Oct 11, 2023
0 parents commit 583d561
Show file tree
Hide file tree
Showing 44 changed files with 2,329 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
target-branch: "devel"
labels:
- "dependabot"
- "gomod"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "devel"
labels:
- "dependabot"
- "github-actions"
40 changes: 40 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Dependabot auto-merge
on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
- uses: actions/checkout@v4
- name: Approve a PR if not already approved
run: |
gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status`
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then
gh pr review --approve "$PR_URL"
else
echo "PR already approved, skipping additional approvals to minimize emails/notification noise.";
fi
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs for github-actions package ecosystem
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions' }}
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs for go_modules package ecosystem
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'go_modules' && steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
130 changes: 130 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
name: PR

on:
pull_request:
types: [opened, synchronize, reopened]

env:
GO111MODULE: on

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Lint code
run: make -s lint
- name: Clean downloaded binaries
run: make -s clean

fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Run fmt
run: make -s fmt
- name: Clean downloaded binaries
run: make -s clean

tests:
strategy:
matrix:
name: [unit, e2e]
runs-on: ubuntu-latest
name: test (${{ matrix.name }})
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Run ${{ matrix.name }} tests
run: make -s test-${{ matrix.name }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}

staticcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2022.1.3"

codeql:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Coverage Test
run: make -s test
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
API_TOKEN: ${{ secrets.API_TOKEN }}
with:
args: >
-Dproject.settings=build/ci/sonar-project.properties
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

builds:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: build (${{ matrix.os }})
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Build on (${{ matrix.os }})
run: make -s build
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
183 changes: 183 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
---
name: CI

on:
push:
branches:
- master

env:
GO111MODULE: on

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Lint code
run: make -s lint
- name: Clean downloaded binaries
run: make -s clean

fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Run fmt
run: make -s fmt
- name: Clean downloaded binaries
run: make -s clean

tests:
strategy:
matrix:
name: [unit, e2e]
runs-on: ubuntu-latest
name: test (${{ matrix.name }})
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Run ${{ matrix.name }} tests
run: make -s test-${{ matrix.name }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}

staticcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2022.1.3"

codeql:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Coverage Test
run: make -s test
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
API_TOKEN: ${{ secrets.API_TOKEN }}
with:
args: >
-Dproject.settings=build/ci/sonar-project.properties
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

builds:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: build (${{ matrix.os }})
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Build on (${{ matrix.os }})
run: make -s build
env:
API_TOKEN: ${{ secrets.API_TOKEN }}

tag:
runs-on: ubuntu-latest
needs: [lint, fmt, tests, codeql, sonarcloud, staticcheck, builds]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch

release:
runs-on: ubuntu-latest
needs: [tag]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set outputs
id: vars
run: |
echo "::set-output name=latest_tag::$(git describe --tags $(git rev-list --tags --max-count=1))"
echo "::set-output name=build_time::$(date -u +'%m-%d-%YT%H:%M:%SZ')"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean --config build/package/.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
API_TOKEN: ${{ secrets.API_TOKEN }}
Loading

0 comments on commit 583d561

Please sign in to comment.