Skip to content

Commit 68fb183

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

File tree

15 files changed

+739
-1476
lines changed

15 files changed

+739
-1476
lines changed
File renamed without changes.

.github/workflows/linter.yml

+18-41
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,29 @@
1-
---
2-
#################################
3-
#################################
4-
## Super Linter GitHub Actions ##
5-
#################################
6-
#################################
7-
name: Lint Code Base
1+
name: MegaLinter
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
209

21-
###############
22-
# Set the Job #
23-
###############
2410
jobs:
25-
build:
26-
# Name the Job
27-
name: Lint Code Base
28-
# Set the agent to run on
11+
megalinter:
12+
name: MegaLinter
2913
runs-on: ubuntu-latest
30-
31-
##################
32-
# Load all steps #
33-
##################
14+
permissions:
15+
contents: write
3416
steps:
35-
##########################
36-
# Checkout the code base #
37-
##########################
3817
- name: Checkout Code
39-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
4019
with:
41-
# Full git history is needed to get a proper list of changed files within `super-linter`
4220
fetch-depth: 0
43-
44-
################################
45-
# Run Linter against code base #
46-
################################
47-
- name: Lint Code Base
48-
uses: github/super-linter@v4
21+
- name: MegaLinter
22+
uses: oxsecurity/megalinter@v7
4923
env:
50-
VALIDATE_ALL_CODEBASE: true
51-
DEFAULT_BRANCH: main
5224
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
VALIDATE_ALL_CODEBASE: >-
26+
${{
27+
github.event_name == 'push' &&
28+
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
29+
}}

.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)