From e928fa498f1476c226c6d9970bc1b126fb275230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 23 Oct 2023 12:34:11 +0200 Subject: [PATCH] Use alternative environment for release build bump (#2855) * Use alternative environment for release build bump By using a separate environment, we can postpone the bump in the version repository by adding a requirement for approval. Dev version will use default (empty string) environment which doesn't have any constraints. * Update build step name - it's not always dev build anymore * Use dynamic environment name for beta/stable channels --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ef01d547a..c913a3f38 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -128,7 +128,7 @@ jobs: push: true build: - name: Development build for ${{ matrix.board.id }} + name: Build for ${{ matrix.board.id }} permissions: contents: write # for actions/upload-release-asset to upload release asset needs: prepare @@ -241,8 +241,9 @@ jobs: output/images/haos_ova*.qcow2.xz bump_version: - name: Bump dev channel version + name: Bump ${{ needs.prepare.outputs.channel }} channel version if: ${{ github.repository == 'home-assistant/operating-system' }} + environment: "${{ github.event_name == 'release' && needs.prepare.outputs.channel || '' }}" needs: [ build, prepare ] runs-on: ubuntu-22.04