From 81f6f1b233f4d6624d9d3ae43223ab567715d1a5 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Wed, 18 May 2022 10:32:02 -0700 Subject: [PATCH] Add mirroring to samples repo. (#1273) This is to set main as the default branch. --- .github/workflows/mirror.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 000000000..433624a31 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,25 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Mirror master to main branches in the gallery repository. +on: + push: + branches: + - 'main' + +jobs: + mirror_job: + permissions: + pull-requests: write + runs-on: ubuntu-latest + if: ${{ github.repository == 'flutter/samples' }} + name: Mirror main branch to master branch + steps: + - name: Mirror action step + id: mirror + uses: google/mirror-branch-action@c6b07e441a7ffc5ae15860c1d0a8107a3a151db8 + with: + github-token: ${{ secrets.FLUTTERMIRRORINGBOT_TOKEN }} + source: 'main' + dest: 'master'