From 5999062f0c977eaac87f3ac224901f1e14166fb3 Mon Sep 17 00:00:00 2001 From: shati-patel <42641846+shati-patel@users.noreply.github.com> Date: Thu, 29 Apr 2021 14:58:24 +0100 Subject: [PATCH 1/2] Add workflow to mirror main to master --- .github/workflows/mirror-main-to-master.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/mirror-main-to-master.yml diff --git a/.github/workflows/mirror-main-to-master.yml b/.github/workflows/mirror-main-to-master.yml new file mode 100644 index 0000000..087095d --- /dev/null +++ b/.github/workflows/mirror-main-to-master.yml @@ -0,0 +1,17 @@ +# The default branch is "main", but older checkouts may still use "master". +# This workflow keeps "master" up to date with "main". +name: Mirror main to master + +on: + push: + branches: [ main ] + +jobs: + mirror-main-to-master: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Push main to master + run: git push origin main:master From 1a51efefce12dbeaffb3b35e7be5872d1c815238 Mon Sep 17 00:00:00 2001 From: Shati Patel <42641846+shati-patel@users.noreply.github.com> Date: Thu, 29 Apr 2021 20:51:03 +0100 Subject: [PATCH 2/2] Don't run on forks --- .github/workflows/mirror-main-to-master.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mirror-main-to-master.yml b/.github/workflows/mirror-main-to-master.yml index 087095d..368b208 100644 --- a/.github/workflows/mirror-main-to-master.yml +++ b/.github/workflows/mirror-main-to-master.yml @@ -9,6 +9,7 @@ on: jobs: mirror-main-to-master: runs-on: ubuntu-latest + if: github.repository == 'github/vscode-codeql-starter' steps: - uses: actions/checkout@v2