From c8e8991cf5766e93a7f68c22a7201835a0f4860a Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 30 Aug 2022 14:27:55 +1000 Subject: [PATCH] Fix for stable branch push (#3619) * Fix for stable branch push * Ensure we don't update stable to an older release --- .github/workflows/docker.yaml | 7 ------- .github/workflows/release.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index db20856281..a8442b2c26 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -105,10 +105,3 @@ jobs: COSIGN_EXPERIMENTAL: "true" run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }} - - name: Push to Stable Branch - uses: ad-m/github-push-action@9a46ba8d86d3171233e861a4351b1278a2805c83 # pin@master - if: env.stable_release == 'true' && github.event_name != 'pull_request' - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: stable - force: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c96dce47ca..adbb437889 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,24 @@ on: types: [ published ] jobs: + + stable: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2 + - name: Version Check + run: | + pip install requests + python3 ci/version_check.py + - name: Push to Stable Branch + uses: ad-m/github-push-action@9a46ba8d86d3171233e861a4351b1278a2805c83 # pin@master + if: env.stable_release == 'true' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: stable + force: true + tweet: runs-on: ubuntu-latest steps: