Skip to content

Commit bf776cd

Browse files
Link-lindluni
authored andcommitted
Rewrite CLI in Go
Signed-off-by: Brett Logan <[email protected]>
1 parent e723b28 commit bf776cd

File tree

16 files changed

+782
-1480
lines changed

16 files changed

+782
-1480
lines changed
File renamed without changes.

.github/workflows/codeql.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '41 2 * * 6'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: 'ubuntu-latest'
15+
timeout-minutes: 15
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
25+
- name: Initialize CodeQL
26+
uses: github/codeql-action/init@v2
27+
with:
28+
languages: go
29+
30+
- name: Autobuild
31+
uses: github/codeql-action/autobuild@v2
32+
33+
- name: Perform CodeQL Analysis
34+
uses: github/codeql-action/analyze@v2
35+
with:
36+
category: "/language:go"

.github/workflows/linter.yml

+14-43
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,23 @@
1-
---
2-
#################################
3-
#################################
4-
## Super Linter GitHub Actions ##
5-
#################################
6-
#################################
7-
name: Lint Code Base
1+
name: Lint
82

9-
#
10-
# Documentation:
11-
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12-
#
13-
14-
#############################
15-
# Start the job on all push #
16-
#############################
173
on:
18-
push:
19-
branches-ignore: [master, main]
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.ref }}-${{ github.workflow }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
2012

21-
###############
22-
# Set the Job #
23-
###############
2413
jobs:
25-
build:
26-
# Name the Job
27-
name: Lint Code Base
28-
# Set the agent to run on
14+
lint:
15+
name: Lint
2916
runs-on: ubuntu-latest
30-
31-
##################
32-
# Load all steps #
33-
##################
3417
steps:
35-
##########################
36-
# Checkout the code base #
37-
##########################
3818
- name: Checkout Code
39-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
4020
with:
41-
# Full git history is needed to get a proper list of changed files within `super-linter`
4221
fetch-depth: 0
43-
44-
################################
45-
# Run Linter against code base #
46-
################################
47-
- name: Lint Code Base
48-
uses: github/super-linter@v4
49-
env:
50-
VALIDATE_ALL_CODEBASE: true
51-
DEFAULT_BRANCH: main
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Lint Code
23+
uses: golangci/golangci-lint-action@v3

.github/workflows/release.yml

+7-27
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
11
name: Release
2-
32
on:
4-
workflow_dispatch:
53
push:
6-
branches:
7-
- main
8-
paths:
9-
- 'gh-token'
4+
tags:
5+
- "v*"
6+
permissions:
7+
contents: write
108

119
jobs:
12-
Update:
13-
# The type of runner that the job will run on
10+
release:
1411
runs-on: ubuntu-latest
15-
1612
steps:
17-
- uses: actions/checkout@v2
18-
name: "Checkout repo"
19-
with:
20-
fetch-depth: 0
21-
token: ${{ secrets.GITHUB_TOKEN }}
22-
23-
- name: "Calculate new SHA256 hash"
24-
run: |
25-
new_sha="$(shasum -a 256 gh-token | sed -r 's/gh-token/ghtoken/g')"
26-
sed -r "s/echo \"[0-9a-f]{64} ghtoken\"/echo \"$new_sha\"/g" -i README.md
27-
28-
- name: "Commit and push updates"
29-
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008
30-
with:
31-
author_name: Link-
32-
author_email: '[email protected]'
33-
message: 'Updating sha256 hash value'
34-
add: 'README.md'
13+
- uses: actions/checkout@v3
14+
- uses: cli/gh-extension-precompile@v1

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@ tags
6161
.keys
6262

6363
### Project files
64-
jwt
64+
jwt
65+
66+
# Generated files
67+
gh-token
68+
gh-token.exe
69+
70+
# Test app keys
71+
*.pem

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1111
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1212
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1313
PERFORMANCE OF THIS SOFTWARE.
14+

0 commit comments

Comments
 (0)