diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..6c603c09 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,50 @@ +name: "CodeQL Advanced" + +on: + push: + branches: [ "main", "dev", "demo" ] + pull_request: + branches: [ "main", "dev", "demo" ] + schedule: + - cron: '37 2 * * 5' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: csharp + build-mode: none + - language: javascript-typescript + build-mode: none + # Additional languages can be added here + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the languages you are analyzing, replace this with the commands to build your code.' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml deleted file mode 100644 index 7e4e8b45..00000000 --- a/.github/workflows/sync-branches.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Sync Main to dependabotchanges - -on: - # Schedule the sync job to run daily or customize as needed - schedule: - - cron: '0 1 * * *' # Runs every day at 1 AM UTC - # Trigger the sync job on pushes to the main branch - push: - branches: - - main - -jobs: - sync: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch all history for accurate branch comparison - - - name: Configure Git - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Sync main to dependabotchanges - run: | - # Ensure we're on the main branch - git checkout main - # Fetch the latest changes - git pull origin main - - # Switch to dependabotchanges branch - git checkout dependabotchanges - # Merge main branch changes - git merge main --no-edit - - # Push changes back to dependabotchanges1 branch - git push origin dependabotchanges - - - name: Notify on Failure - if: failure() - run: echo "Sync from main to dependabotchanges failed!"