Skip to content

Commit c00af4a

Browse files
committed
feat: Initial commit.
1 parent 5526d50 commit c00af4a

File tree

99 files changed

+6590
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+6590
-4
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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: "nuget" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
all:
14+
patterns:
15+
- "*"

.github/workflows/auto-merge.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Auto-approve and auto-merge bot pull requests
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
auto-merge:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.actor == 'dependabot[bot]' }}
15+
steps:
16+
- name: Dependabot metadata
17+
id: metadata
18+
uses: dependabot/[email protected]
19+
with:
20+
github-token: "${{ secrets.GITHUB_TOKEN }}"
21+
22+
- name: Approve a PR
23+
# Only if version bump is not a major version change
24+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
25+
run: gh pr review --approve "$PR_URL"
26+
env:
27+
PR_URL: ${{ github.event.pull_request.html_url }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Enable auto-merge
31+
# Only if version bump is not a major version change
32+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
33+
run: gh pr merge --auto --merge "$PR_URL"
34+
env:
35+
PR_URL: ${{ github.event.pull_request.html_url }}
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/auto-update.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Opens a new PR if there are OpenAPI updates
2+
on:
3+
schedule:
4+
- cron: '0 */3 * * *'
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
actions: write
10+
11+
jobs:
12+
check-openapi-updates:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Git user
19+
run: |
20+
git config --local user.email "[email protected]"
21+
git config --local user.name "github-actions[bot]"
22+
23+
- name: Generate branch name
24+
id: branch
25+
run: echo "branch_name=bot/update-openapi_$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
26+
27+
- name: Create branch
28+
run: |
29+
git checkout -b ${{ steps.branch.outputs.branch_name }} origin/main
30+
git rebase main
31+
32+
- name: Generate code
33+
run: |
34+
cd src/libs/Ideogram
35+
chmod +x ./generate.sh
36+
./generate.sh
37+
38+
- name: Check for changes
39+
id: changes
40+
run: |
41+
CHANGED=$(git diff --name-only)
42+
if [ -z "$CHANGED" ]; then
43+
echo "has_changes=false" >> $GITHUB_OUTPUT
44+
else
45+
echo "has_changes=true" >> $GITHUB_OUTPUT
46+
fi
47+
48+
- name: Push changes
49+
if: steps.changes.outputs.has_changes == 'true'
50+
run: |
51+
git add .
52+
git commit -m "feat: Updated OpenAPI spec"
53+
git push --force-with-lease -u origin ${{ steps.branch.outputs.branch_name }}
54+
55+
- name: Wait for 15 seconds
56+
if: steps.changes.outputs.has_changes == 'true'
57+
run: sleep 15
58+
59+
- name: Create pull request
60+
if: steps.changes.outputs.has_changes == 'true'
61+
run: gh pr create -B main -H ${{ steps.branch.outputs.branch_name }} --title 'feat:@coderabbitai' --body '@coderabbitai summary'
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}

.github/workflows/dotnet.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- v**
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
publish:
14+
name: Publish
15+
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
16+
with:
17+
generate-build-number: false
18+
conventional-commits-publish-conditions: false
19+
enable-caching: false
20+
additional-test-arguments: '--logger GitHubActions'
21+
secrets:
22+
nuget-key: ${{ secrets.NUGET_KEY }}
23+
24+
release:
25+
name: Release
26+
runs-on: ubuntu-latest
27+
needs: [publish]
28+
if: startsWith(github.ref, 'refs/tags/v')
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Create release
34+
run: gh release create ${{ github.ref_name }}
35+
--title "${{ github.ref_name }}"
36+
--generate-notes
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/mkdocs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: MKDocs Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- 'examples/**'
10+
- 'src/helpers/GenerateDocs/**'
11+
- '.github/workflows/mkdocs.yml'
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v5
34+
35+
- name: Install dependencies
36+
run: pip install mkdocs-material
37+
38+
- name: Generate docs
39+
run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj .
40+
41+
- name: Build with MkDocs
42+
run: mkdocs build -d ./_site
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.github/workflows/pull-request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
test:
9+
name: Test
10+
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
11+
with:
12+
generate-build-number: false
13+
conventional-commits-publish-conditions: false
14+
enable-caching: false
15+
additional-test-arguments: '--logger GitHubActions'

0 commit comments

Comments
 (0)