Skip to content

Commit

Permalink
chore: update document and workfolws
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengqi committed Sep 13, 2023
1 parent e1bf386 commit f4c4c99
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "feat"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "chore"
include: "scope"
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ example:

documentation:
- docs/**/*
- README.md

dependencies:
- go.mod
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: "codeql"
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
jobs:
analyze:
name: analyze
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches: ['main']
tags: ['v*']
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
permissions:
contents: read
jobs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/grype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on:
push:
branches: ['main']
tags: ['v*']
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
jobs:
scan-source:
name: scan-source
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ on:
- v*
branches:
- main
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
permissions:
contents: read

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: test
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'README.md'

jobs:
unit-test:
Expand All @@ -19,6 +25,7 @@ jobs:
- name: codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
files: coverage.out
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Inspired by [Cobra](https://github.com/spf13/cobra). Cobra is a library for crea
[![Release](https://img.shields.io/github/release/shipengqi/action.svg)](https://github.com/shipengqi/action/releases)
[![License](https://img.shields.io/github/license/shipengqi/action)](https://github.com/shipengqi/action/blob/main/LICENSE)

## Quickstart
## Getting Started

```go
cmd := &cobra.Command{
Expand Down Expand Up @@ -53,8 +53,16 @@ func newSubAction2() *action.Action {
```

- `Executable`: whether is an executable action.
- `Execute()` will find the first executable action of the root action and execute it.
- `action.Execute()` will find the first executable action of the root action and execute it. If no executable action can be found, run the current action.


## Documentation

You can find the docs at [go docs](https://pkg.go.dev/github.com/shipengqi/action).


## 🔋 JetBrains OS licenses

`action` had been being developed with **GoLand** under the **free JetBrains Open Source license(s)** granted by JetBrains s.r.o., hence I would like to express my thanks here.

<a href="https://www.jetbrains.com/?from=action" target="_blank"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains Logo (Main) logo." width="250" align="middle"></a>

0 comments on commit f4c4c99

Please sign in to comment.