forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (41 loc) · 1.11 KB
/
sync-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Sync Main
on:
schedule:
- cron: '55 * * * *'
workflow_dispatch:
jobs:
sync-main:
name: Sync-main
runs-on: ubuntu-latest
if: github.repository == 'microsoft/codeql'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_TOKEN }}
- name: Git config
shell: bash
run: |
git config user.name Dilan Bhalla
git config user.email [email protected]
- name: Sync Main
shell: bash
run: |
set -x
git fetch
git remote add upstream https://github.com/github/codeql.git
git fetch upstream --tags --force
git merge codeql-cli/latest
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
- name: Compile PowerShell Queries
run: |
codeql query compile --check-only --keep-going powershell/ql/src
- name: Complete Sync
shell: bash
run: |
git push origin main
git push origin --tags --force