-
Notifications
You must be signed in to change notification settings - Fork 83
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
1 parent
fc733e6
commit a04d508
Showing
3 changed files
with
100 additions
and
36 deletions.
There are no files selected for viewing
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,19 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.' | ||
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed.' | ||
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' | ||
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' | ||
days-before-issue-stale: 60 | ||
days-before-pr-stale: 60 | ||
days-before-issue-close: -1 | ||
days-before-pr-close: -1 |
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,81 @@ | ||
name: Validate AZD template | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 0 * * *' # Run at midnight every day | ||
|
||
jobs: | ||
infra: | ||
name: "Infra Biceps Validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Bicep for linting | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout | ||
|
||
- name: Run Microsoft Security DevOps Analysis | ||
uses: microsoft/security-devops-action@preview | ||
id: msdo | ||
continue-on-error: true | ||
with: | ||
tools: templateanalyzer | ||
|
||
- name: Upload alerts to Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
if: github.repository == 'Azure-Samples/azure-search-openai-demo' | ||
with: | ||
sarif_file: ${{ steps.msdo.outputs.sarifFile }} | ||
|
||
frontend: | ||
name: "Front-end validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build React Frontend | ||
run: | | ||
echo "Building front-end and merge into Spring Boot static folder. Environment [${{ steps.set-deploy-env.outputs.DEPLOY_ENVIRONMENT }}]" | ||
cd ./app/frontend | ||
npm install | ||
npm run build | ||
backend: | ||
name: "Backend validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Java version | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: Set environment for branch | ||
id: set-deploy-env | ||
run: | | ||
if [[ $GITHUB_REF_NAME == 'refs/heads/main' ]]; then | ||
echo "DEPLOY_ENVIRONMENT=Development" >> "$GITHUB_OUTPUT" | ||
elif [[ $GITHUB_REF_NAME == 'refs/heads/develop' ]]; then | ||
echo "DEPLOY_ENVIRONMENT=Development" >> "$GITHUB_OUTPUT" | ||
elif [[ $GITHUB_REF_NAME == 'refs/heads/release' ]]; then | ||
echo "DEPLOY_ENVIRONMENT=Development" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "DEPLOY_ENVIRONMENT=Development" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Build Spring Boot App | ||
run: | | ||
echo "Building Spring Boot app. Environment [${{ steps.set-deploy-env.outputs.DEPLOY_ENVIRONMENT }}]" | ||
cd ./app/backend | ||
./mvnw verify |