-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/identity #811
Refactor/identity #811
Changes from all commits
3bcdabd
c586ee5
456a930
839ec05
42bc7b8
1c13fed
23aec24
3583d41
e5f71e3
a20dc27
7ecad1d
0dec5c4
be3e5ec
5d81a8f
50d3e8d
edb0902
9a2a2f1
43f5d63
eb564af
f43a371
cf2a914
d7c81aa
91bc617
c4b6746
0171591
1c1d96c
4139551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,70 +16,38 @@ on: | |
pull_request: | ||
branches: | ||
- "**" | ||
push: | ||
branches: | ||
- "v[0-9]**" | ||
workflow_dispatch: | ||
merge_group: | ||
env: | ||
GO_VERSION: "1.20.5" | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-default: | ||
name: Build sonrd-${{ matrix.targetos }}-${{ matrix.arch }} | ||
runs-on: ubuntu-latest | ||
|
||
name: Build sonrd-${{ matrix.targetos }}-${{ matrix.arch }} for ${{ github.ref }} | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
arch: [amd64, arm64] | ||
targetos: [darwin, linux] | ||
include: | ||
- targetos: darwin | ||
arch: arm64 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Get git diff | ||
uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.wasm | ||
**/**.go | ||
go.mod | ||
go.sum | ||
Makefile | ||
.github/workflows/build.yml | ||
|
||
- uses: actions/setup-go@v4 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
env: | ||
GOOS: ${{ matrix.targetos }} | ||
GOARCH: ${{ matrix.arch }} | ||
|
||
- name: Download Dependencies | ||
if: env.GIT_DIFF | ||
run: go mod download | ||
- name: Build sonrd | ||
if: env.GIT_DIFF | ||
run: | | ||
GOWRK=off go build cmd/sonrd/main.go | ||
- name: Upload sonrd artifact | ||
if: env.GIT_DIFF | ||
uses: actions/upload-artifact@v3 | ||
- run: make build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: sonrd-${{ matrix.targetos }}-${{ matrix.arch }} | ||
path: cmd/sonrd/sonrd | ||
|
||
build-make: | ||
name: Build using makefile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Run make build | ||
run: make build | ||
path: bin/sonrd |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: "🧪 CodeQL Analysis" | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: "43 3 * * 2" | ||
|
||
jobs: | ||
codeql-analysis: | ||
name: Run CodeQL Analysis | ||
Comment on lines
1
to
10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feedback:
Here is the updated code:
|
||
|
@@ -12,44 +13,37 @@ jobs: | |
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["go", "typescript"] | ||
queries: ['crypto-com/[email protected]'] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
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 | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
|
||
coverage: | ||
name: Scan/Upload Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PAT }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
Comment on lines
13
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall, the code changes look good, but here are a few suggestions for improvement:
These changes help improve the readability, organization, and maintainability of the code. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ permissions: | |
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -21,7 +21,7 @@ jobs: | |
input: "proto" | ||
|
||
break-check: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bufbuild/[email protected] | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ permissions: | |
jobs: | ||
release: | ||
name: Run goreleaser | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
Comment on lines
17
to
23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code changes look good, but it would be better if we specify a specific version of the self-hosted runner instead of using "self-hosted". This will ensure consistency and prevent any unexpected issues from using different versions of the self-hosted runner. jobs:
release:
name: Run goreleaser
runs-on: self-hosted[VERSION_TAG]
steps:
- uses: actions/checkout@v3
with: Replace |
||
|
@@ -26,9 +26,11 @@ jobs: | |
- run: make release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-buf: | ||
name: Publish buf.build proto | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
needs: release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
Comment on lines
26
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feedback:
Code example:
Note: Replace |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from "ubuntu-latest" to "ubuntu-ultra-instinct" in the "runs-on" field of the job looks like a naming convention change. However, it is always preferable to use the available official environment labels provided by GitHub. In this case, "ubuntu-latest" is the standard label, so it should be retained.
By sticking to the official environment labels, it ensures consistency and makes it easier to understand and maintain the code in the long run.