Skip to content

Commit 715cbc2

Browse files
committed
feat: add auto workflow
1 parent cfd2416 commit 715cbc2

38 files changed

+988
-53
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!-- Thanks for sending a pull request! Here are some tips for you:
2+
3+
4+
1. If this is your first time, please read our contributor guidelines: https://github.com/kube-arbiter/arbiter/blob/main/CONTRIBUTING.md
5+
2. Ensure you have added or ran the appropriate tests for your PR
6+
7+
-->
8+
9+
#### What type of PR is this?
10+
11+
<!--
12+
Add one of the following kinds:
13+
/kind bug
14+
/kind cleanup
15+
/kind documentation
16+
/kind feature
17+
18+
Optionally add one or more of the following kinds if applicable:
19+
/kind api-change
20+
/kind deprecation
21+
/kind failing-test
22+
/kind flake
23+
/kind regression
24+
-->
25+
26+
#### What this PR does / why we need it:
27+
28+
#### Which issue(s) this PR fixes:
29+
<!--
30+
*Automatically closes linked issue when PR is merged.
31+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
32+
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
33+
-->
34+
Fixes #
35+
36+
#### Special notes for your reviewer:
37+
38+
#### Does this PR introduce a user-facing change?
39+
<!--
40+
If no, just write "NONE" in the release-note block below.
41+
If yes, a release note is required:
42+
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
43+
44+
For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
45+
-->
46+
```release-note
47+
48+
```

.github/auto_request_review.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
reviewers:
2+
defaults:
3+
- nkwangleiGIT
4+
- 0xff-dev
5+
- Abirdcfly
6+
7+
options:
8+
ignore_draft: true
9+
ignored_keywords:
10+
- DO NOT REVIEW
11+
- DNR
12+
- DO NOT MERGE
13+
- DNM
14+
- WIP
15+
- WORK IN PROCESS
16+
enable_group_assignment: false
17+
18+
number_of_reviewers: 3

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod" # See documentation for possible values
9+
directory: "executor-plugins/resource-tagger" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
- package-ecosystem: "gomod" # See documentation for possible values
13+
directory: "observer-plugins/metric-server" # Location of package manifests
14+
schedule:
15+
interval: "daily"
16+
- package-ecosystem: "gomod" # See documentation for possible values
17+
directory: "observer-plugins/prometheus" # Location of package manifests
18+
schedule:
19+
interval: "daily"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Auto Request Review
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review, reopened]
6+
7+
jobs:
8+
auto-request-review:
9+
name: Auto Request Review
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Request review based on files changes and/or groups the author belongs to
13+
uses: necojackarc/auto-request-review@b5e81876454003a4ccb9b89cb205c67d77d7035b #Using sha pinning instead of version tag of v0.8.0
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/check.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
env:
9+
GO_VERSION: "^1.19"
10+
11+
jobs:
12+
verify:
13+
name: verify
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 30
16+
steps:
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v3
19+
- name: Set up Go command
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ env.GO_VERSION }}
23+
check-latest: true
24+
- name: verify
25+
run: make verify
26+
- name: make for test
27+
run: make

.github/workflows/codeql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '30 1 * * 1' # utc -> Beijing 9:30 Monday
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language:
24+
- go
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v2
30+
with:
31+
languages: ${{ matrix.language }}
32+
# If you wish to specify custom queries, you can do so here or in a config file.
33+
# By default, queries listed here will override any specified in a config file.
34+
# Prefix the list here with "+" to use these queries and those in the config file.
35+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v2

.github/workflows/greetings.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Greetings
2+
3+
on: [issues, pull_request_target]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/first-interaction@v1
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
issue-message: 'Hi, this is your first issue in arbiter-plugins project. Thanks for your report. Welcome to join the community!'
13+
pr-message: 'Hi, this is your first pull request in arbiter-plugins project. Thanks for your contribution! Arbiter will be better because of you.'

.github/workflows/pushimage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: push
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
GO_VERSION: "^1.19"
11+
12+
jobs:
13+
verify:
14+
name: verify
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 30
17+
steps:
18+
- name: Check out code into the Go module directory
19+
uses: actions/checkout@v3
20+
- name: Set up Go command
21+
uses: actions/setup-go@v3
22+
with:
23+
go-version: ${{ env.GO_VERSION }}
24+
check-latest: true
25+
- name: verify
26+
run: make verify
27+
- name: Login to docker
28+
if: github.repository == 'kube-arbiter/arbiter-plugins'
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
- name: Build image and Push
34+
if: github.repository == 'kube-arbiter/arbiter-plugins'
35+
run: make image OUTPUT_TYPE=registry IMAGE_TAG=dev

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
permissions:
10+
contents: write
11+
packages: write
12+
13+
env:
14+
GO_VERSION: "^1.19"
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Fetch all tags
23+
run: git fetch --force --tags
24+
- name: Set up Go
25+
uses: actions/setup-go@v3
26+
with:
27+
go-version: ${{ env.GO_VERSION }}
28+
check-latest: true
29+
- name: Login to docker
30+
uses: docker/login-action@v2
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
- name: Run GoReleaser
35+
uses: goreleaser/goreleaser-action@v3
36+
with:
37+
distribution: goreleaser
38+
version: latest
39+
args: release --rm-dist
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
.vscode/*
2+
!.vscode/settings.json
3+
!.vscode/tasks.json
4+
!.vscode/launch.json
5+
!.vscode/extensions.json
6+
*.code-workspace
7+
.history/
8+
xcuserdata/
9+
*.xcscmblueprint
10+
*.xccheckout
11+
DerivedData/
12+
*.moved-aside
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
/*.gcno
22+
.idea
23+
.idea/**/workspace.xml
24+
.idea/**/tasks.xml
25+
.idea/**/usage.statistics.xml
26+
.idea/**/dictionaries
27+
.idea/**/shelf
28+
.idea/**/contentModel.xml
29+
.idea/**/dataSources/
30+
.idea/**/dataSources.ids
31+
.idea/**/dataSources.local.xml
32+
.idea/**/sqlDataSources.xml
33+
.idea/**/dynamic.xml
34+
.idea/**/uiDesigner.xml
35+
.idea/**/dbnavigator.xml
36+
.idea/**/gradle.xml
37+
.idea/**/libraries
38+
cmake-build-*/
39+
.idea/**/mongoSettings.xml
40+
*.iws
41+
out/
42+
.idea_modules/
43+
atlassian-ide-plugin.xml
44+
.idea/replstate.xml
45+
com_crashlytics_export_strings.xml
46+
crashlytics.properties
47+
crashlytics-build.properties
48+
fabric.properties
49+
.idea/httpRequests
50+
.idea/caches/build_file_checksums.ser
51+
.Python
52+
[Bb]in
53+
[Ii]nclude
54+
[Ll]ib64
55+
pyvenv.cfg
56+
.venv
57+
pip-selfcheck.json
58+
*~
59+
.fuse_hidden*
60+
.directory
61+
.Trash-*
62+
.nfs*
63+
*.exe
64+
*.exe~
65+
*.dll
66+
*.so
67+
*.dylib
68+
*.test
69+
*.out
70+
.svn/
71+
[._]*.s[a-v][a-z]
72+
!*.svg # comment out if you don't need vector files
73+
[._]*.sw[a-p]
74+
[._]s[a-rt-v][a-z]
75+
[._]ss[a-gi-z]
76+
[._]sw[a-p]
77+
Session.vim
78+
Sessionx.vim
79+
.netrwhist
80+
tags
81+
[._]*.un~
82+
Thumbs.db
83+
Thumbs.db:encryptable
84+
ehthumbs.db
85+
ehthumbs_vista.db
86+
*.stackdump
87+
[Dd]esktop.ini
88+
$RECYCLE.BIN/
89+
*.cab
90+
*.msi
91+
*.msix
92+
*.msm
93+
*.msp
94+
*.lnk
95+
.DS_Store
96+
.AppleDouble
97+
.LSOverride
98+
Icon
99+
._*
100+
.DocumentRevisions-V100
101+
.fseventsd
102+
.Spotlight-V100
103+
.TemporaryItems
104+
.Trashes
105+
.VolumeIcon.icns
106+
.com.apple.timemachine.donotpresent
107+
.AppleDB
108+
.AppleDesktop
109+
Network Trash Folder
110+
Temporary Items
111+
.apdisk
112+
.vagrant/
113+
_output/
114+
**/vendor/**

0 commit comments

Comments
 (0)