-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Abirdcfly/main
feat: add auto workflow
- Loading branch information
Showing
38 changed files
with
988 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- Thanks for sending a pull request! Here are some tips for you: | ||
1. If this is your first time, please read our contributor guidelines: https://github.com/kube-arbiter/arbiter/blob/main/CONTRIBUTING.md | ||
2. Ensure you have added or ran the appropriate tests for your PR | ||
--> | ||
|
||
#### What type of PR is this? | ||
|
||
<!-- | ||
Add one of the following kinds: | ||
/kind bug | ||
/kind cleanup | ||
/kind documentation | ||
/kind feature | ||
Optionally add one or more of the following kinds if applicable: | ||
/kind api-change | ||
/kind deprecation | ||
/kind failing-test | ||
/kind flake | ||
/kind regression | ||
--> | ||
|
||
#### What this PR does / why we need it: | ||
|
||
#### Which issue(s) this PR fixes: | ||
<!-- | ||
*Automatically closes linked issue when PR is merged. | ||
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. | ||
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* | ||
--> | ||
Fixes # | ||
|
||
#### Special notes for your reviewer: | ||
|
||
#### Does this PR introduce a user-facing change? | ||
<!-- | ||
If no, just write "NONE" in the release-note block below. | ||
If yes, a release note is required: | ||
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". | ||
For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md | ||
--> | ||
```release-note | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
reviewers: | ||
defaults: | ||
- nkwangleiGIT | ||
- 0xff-dev | ||
- Abirdcfly | ||
|
||
options: | ||
ignore_draft: true | ||
ignored_keywords: | ||
- DO NOT REVIEW | ||
- DNR | ||
- DO NOT MERGE | ||
- DNM | ||
- WIP | ||
- WORK IN PROCESS | ||
enable_group_assignment: false | ||
|
||
number_of_reviewers: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "executor-plugins/resource-tagger" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "observer-plugins/metric-server" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "observer-plugins/prometheus" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Auto Request Review | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, ready_for_review, reopened] | ||
|
||
jobs: | ||
auto-request-review: | ||
name: Auto Request Review | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Request review based on files changes and/or groups the author belongs to | ||
uses: necojackarc/auto-request-review@b5e81876454003a4ccb9b89cb205c67d77d7035b #Using sha pinning instead of version tag of v0.8.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
GO_VERSION: "^1.19" | ||
|
||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: Set up Go command | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
- name: verify | ||
run: make verify | ||
- name: make for test | ||
run: make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '30 1 * * 1' # utc -> Beijing 9:30 Monday | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- go | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Greetings | ||
|
||
on: [issues, pull_request_target] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: 'Hi, this is your first issue in arbiter-plugins project. Thanks for your report. Welcome to join the community!' | ||
pr-message: 'Hi, this is your first pull request in arbiter-plugins project. Thanks for your contribution! Arbiter will be better because of you.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: push | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GO_VERSION: "^1.19" | ||
|
||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: Set up Go command | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
- name: verify | ||
run: make verify | ||
- name: Login to docker | ||
if: github.repository == 'kube-arbiter/arbiter-plugins' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build image and Push | ||
if: github.repository == 'kube-arbiter/arbiter-plugins' | ||
run: make image OUTPUT_TYPE=registry IMAGE_TAG=dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
env: | ||
GO_VERSION: "^1.19" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
- name: Login to docker | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
*.code-workspace | ||
.history/ | ||
xcuserdata/ | ||
*.xcscmblueprint | ||
*.xccheckout | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
/*.gcno | ||
.idea | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
.idea/**/contentModel.xml | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
cmake-build-*/ | ||
.idea/**/mongoSettings.xml | ||
*.iws | ||
out/ | ||
.idea_modules/ | ||
atlassian-ide-plugin.xml | ||
.idea/replstate.xml | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
.idea/httpRequests | ||
.idea/caches/build_file_checksums.ser | ||
.Python | ||
[Bb]in | ||
[Ii]nclude | ||
[Ll]ib64 | ||
pyvenv.cfg | ||
.venv | ||
pip-selfcheck.json | ||
*~ | ||
.fuse_hidden* | ||
.directory | ||
.Trash-* | ||
.nfs* | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
*.test | ||
*.out | ||
.svn/ | ||
[._]*.s[a-v][a-z] | ||
!*.svg # comment out if you don't need vector files | ||
[._]*.sw[a-p] | ||
[._]s[a-rt-v][a-z] | ||
[._]ss[a-gi-z] | ||
[._]sw[a-p] | ||
Session.vim | ||
Sessionx.vim | ||
.netrwhist | ||
tags | ||
[._]*.un~ | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
*.stackdump | ||
[Dd]esktop.ini | ||
$RECYCLE.BIN/ | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
*.lnk | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
._* | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
.vagrant/ | ||
_output/ | ||
**/vendor/** |
Oops, something went wrong.