-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
114 changed files
with
6,207 additions
and
1,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: DockerBuildCheck | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
build-base: | ||
name: Build Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Dependabot auto-merge | ||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Enable auto-merge for Dependabot PRs | ||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'}} | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- '**' | ||
# pull_request: | ||
# branches: | ||
# - '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# test: | ||
# runs-on: ubuntu-22.04 | ||
# strategy: | ||
# matrix: | ||
# go: ['1.17', '1.18', '1.19'] | ||
# name: Go ${{ matrix.go }} test | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup go | ||
# uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: ${{ matrix.go }} | ||
# - run: go test -race -v -coverprofile=profile.cov ./pkg/... | ||
# - uses: codecov/[email protected] | ||
# with: | ||
# file: ./profile.cov | ||
# name: codecov-go | ||
release: | ||
runs-on: ubuntu-22.04 | ||
# needs: [test] | ||
# if: ${{ github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Source checkout | ||
uses: actions/checkout@v3 | ||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
with: | ||
dry_run: false | ||
semantic_version: 18.0.1 | ||
extra_plugins: | | ||
@semantic-release/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
*.log | ||
.idea | ||
*test.go | ||
config/config.yaml | ||
*config.yaml | ||
scripts/k8s/config/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
branches: ["main", {name: 'alpha', prerelease: true}, {name: 'beta', prerelease: true}], | ||
plugins: [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
package config | ||
|
||
import ( | ||
"fmt" | ||
"github.com/spf13/cobra" | ||
"supreme-flamego/config" | ||
"os" | ||
"supreme-flamego/conf" | ||
) | ||
|
||
var ( | ||
configYml string | ||
forceGen bool | ||
StartCmd = &cobra.Command{ | ||
configPath string | ||
forceGen bool | ||
StartCmd = &cobra.Command{ | ||
Use: "config", | ||
Short: "Generate config file", | ||
Example: "app config -p config/config.yaml -f", | ||
Example: "mod config -p ./config.yaml -f", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
println("Generate config...") | ||
fmt.Println("Generating config...") | ||
err := load() | ||
if err != nil { | ||
println(err.Error()) | ||
fmt.Println(err.Error()) | ||
os.Exit(1) | ||
} | ||
}, | ||
} | ||
) | ||
|
||
func init() { | ||
StartCmd.PersistentFlags().StringVarP(&configYml, "path", "p", "config/config.yaml", "Generate config in provided path") | ||
StartCmd.PersistentFlags().StringVarP(&configPath, "path", "p", "./config.yaml", "Generate config in provided path") | ||
StartCmd.PersistentFlags().BoolVarP(&forceGen, "force", "f", false, "Force generate config in provided path") | ||
} | ||
|
||
func load() error { | ||
return config.GenConfig(configYml, forceGen) | ||
return conf.GenYamlConfig(configPath, forceGen) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.