Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/dependabot-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Verify Dependabot Version Update (JavaScript)

on:
pull_request:
branches:
- main
types:
- opened
- synchronize

permissions:
contents: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest # Use Ubuntu for JavaScript projects
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x' # Specify your Node.js version

# Restore, Build, and Test all JavaScript projects
- name: Install and Test JavaScript Projects
run: |
for dir in angular-spa msal-client-credentials-flow protect-api protect-function-app protected-api-access-protected-api react-spa vanillajs-spa; do
echo "Processing directory: $dir"
cd $dir
npm install
npm run test || npm test # Some projects might use different commands
cd ..
done

# dependabot-auto-merge:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Auto-merge Dependabot PR
# if: github.event.pull_request.user.login == 'dependabot[bot]' # Only run on Dependabot PRs
# run: |
# gh pr merge ${{ github.event.pull_request.number }} --merge --admin --repo ${{ github.repository }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
Loading
Loading