Skip to content

Commit f46f0a5

Browse files
committed
Add the initial project structure.
1 parent 2b90f24 commit f46f0a5

File tree

16 files changed

+611
-0
lines changed

16 files changed

+611
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/go.sum linguist-generated
2+
/.licenses/** linguist-generated

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.14.7
22+
- name: Build
23+
uses: goreleaser/goreleaser-action@v2
24+
with:
25+
version: latest
26+
args: --rm-dist --snapshot
27+
28+
test:
29+
name: Test
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Setup Go
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: 1.14.7
38+
- name: Test
39+
run: go test .
40+
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-20.04
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Setup Go
48+
uses: actions/setup-go@v2
49+
with:
50+
go-version: 1.14.7
51+
- name: Check Modules
52+
run: |
53+
go mod tidy
54+
if [ ! -z "$(git status --porcelain=v1)" ]; then
55+
>&2 echo "Please run \`go mod tidy\` and commit the result."
56+
exit 1
57+
fi
58+
- name: Lint
59+
uses: golangci/golangci-lint-action@v1
60+
with:
61+
version: v1.29
62+
63+
licensedci:
64+
name: Check Licenses
65+
runs-on: ubuntu-20.04
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
- name: Setup Go
70+
uses: actions/setup-go@v2
71+
with:
72+
go-version: 1.14.7
73+
- name: Setup licensedci
74+
uses: jonabc/setup-licensed@v1
75+
with:
76+
version: 2.x
77+
- name: Run licensedci
78+
run: licensed status

.github/workflows/codeql.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: 0 0 * * 0
12+
13+
jobs:
14+
analyse:
15+
name: Analyse
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 2
23+
- run: git checkout HEAD^2
24+
if: ${{ github.event_name == 'pull_request' }}
25+
- name: Initialize CodeQL
26+
uses: github/codeql-action/init@v1
27+
with:
28+
languages: go
29+
- name: Perform CodeQL Analysis
30+
uses: github/codeql-action/analyze@v1

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "**"
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.14.7
21+
- name: Release
22+
uses: goreleaser/goreleaser-action@v2
23+
with:
24+
version: latest
25+
args: release --rm-dist
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/codeql-action-sync
2+
/dist/

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- goimports

.goreleaser.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project_name: codeql-action-sync
2+
3+
builds:
4+
- goos: [linux, darwin, windows]
5+
goarch: [386, amd64, arm64]
6+
ldflags:
7+
- -X github.com/github/codeql-action-sync/internal/version.version={{.Version}}
8+
- -X github.com/github/codeql-action-sync/internal/version.commit={{.Commit}}

.licensed.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
allowed:
2+
- apache-2.0
3+
- bsd-2-clause
4+
- bsd-3-clause
5+
- mit
6+
- unlicense

.licenses/go/github.com/spf13/cobra.dep.yml

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.licenses/go/github.com/spf13/pflag.dep.yml

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)