From 0a44e5257f162f209716d52787df7ec0879a8852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Tue, 6 Aug 2024 13:35:52 +0200 Subject: [PATCH] ci: add refresh-downstreams workflow --- .github/workflows/refresh-downstreams.yml | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/refresh-downstreams.yml diff --git a/.github/workflows/refresh-downstreams.yml b/.github/workflows/refresh-downstreams.yml new file mode 100644 index 0000000..fa00905 --- /dev/null +++ b/.github/workflows/refresh-downstreams.yml @@ -0,0 +1,36 @@ +name: Refresh downstreams + +on: + push: + branches: + - main + +jobs: + Refresh: + runs-on: ubuntu-latest + + timeout-minutes: 5 + + strategy: + fail-fast: false + matrix: + ref: + - asahi + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + # so that we know what to cherry-pick from + fetch-depth: 2 + + - name: Update `${{ matrix.ref }}` + env: + GIT_COMMITTER_NAME: "Mir CI Bot" + GIT_COMMITTER_EMAIL: "mir-ci-bot@canonical.com" + run: | + # bring upstream changes in + git fetch origin ${{ matrix.ref }} + git cherry-pick HEAD..origin/${{ matrix.ref }} + + git push --force origin HEAD:${{ matrix.ref }}