From a75c8a574fdc8aa9e3346d7a594eb17dac4ad649 Mon Sep 17 00:00:00 2001 From: Dennis Kwok Date: Thu, 30 May 2024 15:16:46 -0700 Subject: [PATCH] .github/workflows: Add other branches to update --- .github/workflows/update.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 7cf6a40..ee0b1b4 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -12,30 +12,36 @@ jobs: environment: upstream-link strategy: fail-fast: false + matrix: + branch_name: + - dunfell + - kirkstone + - scarthgap + - master steps: - name: Checkout main branch uses: actions/checkout@v4 with: - ref: master + ref: ${{ matrix.branch_name }} submodules: recursive fetch-depth: 0 - name: Update run: | git fetch -p origin - git checkout master + git checkout ${{ matrix.branch_name }} # Note: upstream needs to point to the origin repo git remote add upstream "${{ vars.UPSTREAM_URL }}" git fetch -p upstream - if git diff --quiet origin/master..upstream/master; then + if git diff --quiet origin/${{ matrix.branch_name }}..upstream/${{ matrix.branch_name }}; then echo "No changes detected" exit 0 fi - git rebase upstream/master + git rebase upstream/${{ matrix.branch_name }} - name: Push Updates id: push-branch @@ -54,6 +60,7 @@ jobs: # For posting a simple plain text message slack-message: | ${{ github.repository }}: ${{ github.workflow }}: ${{ job.status }} + Branch: ${{ matrix.branch_name }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} @@ -67,9 +74,10 @@ jobs: # For posting a simple plain text message slack-message: | ${{ github.repository }}: ${{ github.workflow }}: *${{ job.status }}* + Branch: ${{ matrix.branch_name }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - <@UCUGH2DGQ> <@U040UU3FR28> <@U032H2U0KL5> <@U015UP4P483> + <@UCUGH2DGQ> - # dennis, ahmad, chinmayi, robert + # dennis env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}