-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
108 changed files
with
19,232 additions
and
1,799 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,64 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run: | ||
name: Run | ||
environment: ${{inputs.environment}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repos | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: Update .env | ||
shell: pwsh | ||
run: | | ||
$content = Get-Content -Path ${{env.FILE_PATH}} | ||
$content = $content -Replace "{{APP_CLIENT_ID}}", "${{vars.APP_CLIENT_ID}}" | ||
$content = $content -Replace '{{APP_SERVER_ID}}', '${{vars.APP_SERVER_ID}}' | ||
$content = $content -Replace "{{APP_TENANT_ID}}", "${{vars.APP_TENANT_ID}}" | ||
$content = $content -Replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}" | ||
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8 | ||
env: | ||
FILE_PATH: source/client/.env | ||
- name: Update package.json | ||
run: npm version ${{vars.BUILD_VERSION}} --no-git-tag-version | ||
working-directory: source/client | ||
- name: Restore client | ||
run: npm ci | ||
working-directory: source/client | ||
- name: Audit client | ||
run: npm audit --omit=dev | ||
working-directory: source/client | ||
- name: Build client | ||
run: npm run build | ||
working-directory: source/client | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
- name: Restore server | ||
run: dotnet restore | ||
working-directory: source/server | ||
- name: Build server | ||
shell: pwsh | ||
run: | | ||
dotnet publish ` | ||
Karamem0.BookingsBot/Karamem0.BookingsBot.csproj ` | ||
-c Release ` | ||
-p:PublishDir=${{github.workspace}}/source/build ` | ||
-p:Version=${{vars.BUILD_VERSION}}.${{github.run_number}} ` | ||
-p:FileVersion=${{vars.BUILD_VERSION}}.${{github.run_number}} | ||
working-directory: source/server | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: source/build |
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 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run: | ||
name: Run | ||
environment: ${{inputs.environment}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifatcs | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: build | ||
- name: Connect to Azure | ||
uses: azure/login@v2 | ||
with: | ||
creds: ${{secrets.AZURE_CREDENTIALS}} | ||
- name: Deploy to Azure Web App | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{vars.AZURE_APP_SERVICE_NAME}} | ||
package: build |
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 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
with: | ||
environment: dev | ||
deploy: | ||
name: Deploy | ||
needs: build | ||
uses: ./.github/workflows/deploy.yml | ||
secrets: inherit | ||
with: | ||
environment: 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,19 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
with: | ||
environment: prd | ||
deploy: | ||
name: Deploy | ||
needs: build | ||
uses: ./.github/workflows/deploy.yml | ||
secrets: inherit | ||
with: | ||
environment: prd |
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,11 @@ | ||
on: workflow_call | ||
|
||
jobs: | ||
run: | ||
name: Run | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create release | ||
uses: softprops/action-gh-release@v2 | ||
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,10 @@ | ||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
uses: ./.github/workflows/release.yml | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Microsoft Bookings Bot | ||
|
||
[![.github/workflows/main.yml](https://github.com/karamem0/bookings-bot/actions/workflows/workflow.yml/badge.svg?branch=main)](https://github.com/karamem0/bookings-bot/actions/workflows/workflow.yml) | ||
[![codecov](https://codecov.io/gh/karamem0/bookings-bot/graph/badge.svg?token=HJXEVPEAHV)](https://codecov.io/gh/karamem0/bookings-bot) | ||
[![License](https://img.shields.io/github/license/karamem0/bookings-bot.svg)](https://github.com/karamem0/bookings-bot/blob/main/LICENSE) | ||
|
||
[Microsoft Bookings API](https://learn.microsoft.com/ja-jp/graph/api/resources/booking-api-overview) を使用して [Microsoft Bookings](https://www.microsoft.com/ja-jp/microsoft-365/business/scheduling-and-booking-app) の予約をするボットです。 |
Oops, something went wrong.