From 943004cf4339e579bd696875a2584cb098c65a65 Mon Sep 17 00:00:00 2001 From: Felipe Lalanne Date: Fri, 23 Sep 2022 13:43:07 +0000 Subject: [PATCH] Add custom flowzone action to finalize staging releases Change-type: patch --- .github/actions/finalize/action.yml | 22 ++++++++++++++++++++++ .github/workflows/flowzone.yml | 12 ++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/actions/finalize/action.yml diff --git a/.github/actions/finalize/action.yml b/.github/actions/finalize/action.yml new file mode 100644 index 00000000..8e103b97 --- /dev/null +++ b/.github/actions/finalize/action.yml @@ -0,0 +1,22 @@ +# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action +name: 'Finalize releases on staging' +description: 'Custom publish step to finalize releases on balena staging' +# these inputs are always provided by flowzone, so they must always be defined on the composite action +inputs: + json: + description: 'JSON stringified object containing all the inputs from the calling workflow' + required: true + secrets: + description: 'JSON stringified object containing all the secrets from the calling workflow' + required: true + +runs: + using: 'composite' + steps: + - uses: balena-io/deploy-to-balena-action@v0.13.0 + with: + balena_token: ${{ fromJSON(inputs.secrets).CUSTOM_JOB_SECRET_1 }} + fleet: ${{ env.matrix_value }} + environment: balena-staging.com + versionbot: false # ignore versionbot branch since the flowzone source is already versioned + source: . diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index 5d10ffbd..b5c13182 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -4,8 +4,8 @@ on: pull_request: types: [opened, synchronize, closed] branches: - - "main" - - "master" + - 'main' + - 'master' jobs: flowzone: @@ -24,8 +24,12 @@ jobs: balena_os/armv7hf-supervisor, balena_os/i386-supervisor, balena_os/rpi-supervisor - custom_publish_matrix: - balena_os/aarch64-supervisor, + custom_publish_matrix: balena_os/aarch64-supervisor, + balena_os/amd64-supervisor, + balena_os/armv7hf-supervisor, + balena_os/i386-supervisor, + balena_os/rpi-supervisor + custom_finalize_matrix: balena_os/aarch64-supervisor, balena_os/amd64-supervisor, balena_os/armv7hf-supervisor, balena_os/i386-supervisor,