-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/uvicorn-0.x
- Loading branch information
Showing
26 changed files
with
857 additions
and
476 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,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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
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,128 @@ | ||
name: core-preview | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- main | ||
paths: | ||
- '*.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
- .github/workflows/core-preview.yaml | ||
pull_request_review: | ||
types: [submitted] | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
core-unit-test: | ||
if: | | ||
(github.event_name == 'issue_comment' && | ||
contains(github.event.comment.body, 'test') && | ||
github.event.issue.pull_request != null && | ||
github.event.pull_request.changed_files > 0) || | ||
(github.event_name == 'pull_request_review' && | ||
github.event.review.state == 'approved' && | ||
github.event.pull_request.changed_files > 0) | ||
name: Core unit tests | ||
runs-on: ubicloud-standard-2 | ||
strategy: | ||
matrix: | ||
go-version: [ '1.21', '1.22', '1.23' ] | ||
steps: | ||
- name: Check for path changes | ||
id: path-check | ||
run: | | ||
echo "Checking for changes in specified paths..." | ||
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.go$|go\.mod|go\.sum|\.github/workflows/core-pull\.yaml' || echo "no-changes" | ||
- uses: actions/checkout@v4 | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
|
||
- name: Copy and rename config file | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
run: cp config_example.yaml config.yaml | ||
|
||
- name: Setup Go ${{ matrix.go-version }} | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install dependencies | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
run: go get -v | ||
|
||
- name: Run unit tests | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
run: ENV=test go test ./... | ||
|
||
core-docker-build: | ||
if: | | ||
(github.event_name == 'issue_comment' && | ||
contains(github.event.comment.body, 'test') && | ||
github.event.issue.pull_request != null && | ||
github.event.pull_request.changed_files > 0) || | ||
(github.event_name == 'pull_request_review' && | ||
github.event.review.state == 'approved' && | ||
github.event.pull_request.changed_files > 0) | ||
runs-on: ubicloud-standard-2 | ||
steps: | ||
- name: Check for path changes | ||
id: path-check | ||
run: | | ||
echo "Checking for changes in specified paths..." | ||
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.go$|go\.mod|go\.sum|\.github/workflows/core-pull\.yaml' || echo "no-changes" | ||
- name: Login to Github Packages | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
id: qemu | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
|
||
- name: 🏗 Setup repo | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Context for Buildx | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
run: docker context create builders | ||
|
||
- name: Set up Docker Buildx | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
version: latest | ||
endpoint: builders | ||
|
||
- name: Docker meta | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
id: openshield | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
ghcr.io/openshieldai/openshield/openshield | ||
tags: | | ||
type=sha | ||
type=raw,value=latest | ||
- name: Build | ||
if: steps.path-check.outputs.result != 'no-changes' | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/arm64,linux/amd64 | ||
push: false | ||
tags: ${{ steps.openshield.outputs.tags }} | ||
labels: ${{ steps.openshield.outputs.labels }} |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
github-releases-to-discord: | ||
name: Github Releases To Discord | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Github Releases To Discord | ||
uses: SethCohen/[email protected] | ||
with: | ||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
color: "2105893" | ||
username: "Release Changelog" | ||
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png" | ||
content: "||@everyone||" | ||
footer_title: "Changelog" | ||
footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png" | ||
footer_timestamp: true |
Oops, something went wrong.