Support storing GHA outputs in specified .properties file

This commit is contained in:
kifir 2024-07-06 22:59:29 +03:00 committed by rusefillc
parent 6b49529142
commit cb0f88a965
1 changed files with 19 additions and 0 deletions

View File

@ -79,6 +79,10 @@ inputs:
required: false
EXTRA_LIVE_DATA_FILE:
required: false
gha_outputs_file:
description: '.properties file to store GHA outputs (unfortunately GGA outputs do not work for nested GHA - see https://github.com/actions/runner/issues/2009#issuecomment-1793565031)'
required: false
default: 'false'
runs:
using: "composite"
@ -160,6 +164,7 @@ runs:
echo "white_label=$(bash ${{inputs.rusefi_dir}}/firmware/bin/find_white_label.sh shared_io.resources/shared_io.properties)" >> $GITHUB_OUTPUT
- name: Set Env Variables
id: set-env-variables
shell: bash
run: |
: Set Env Variables
@ -534,3 +539,17 @@ runs:
run: |
: Upload Obfuscated Tagged Daily Release Bundle
bash ../firmware/bin/upload_bundle.sh ${{ inputs.RUSEFI_OBFUSCATED_PUBLIC_SSH_USER }} "${{ inputs.RUSEFI_OBFUSCATED_PUBLIC_SSH_PASS }}" ${{ inputs.RUSEFI_OBFUSCATED_PUBLIC_SSH_SERVER }} "${{env.SHORT_BOARD_NAME}}_obfuscated_public" ${{ inputs.new_tag }}
- name: Create .properties file for action outputs
if: ${{ inputs.gha_outputs_file != ''}}
uses: 1arp/create-a-file-action@0.4.5
with:
file: ${{ inputs.gha_outputs_file }}
- name: Populate .properties file with action outputs
if: ${{ inputs.gha_outputs_file != ''}}
uses: kurt-code/gha-properties@v0.0.2
with:
operation: 'write'
file-path: ${{ inputs.gha_outputs_file }}
key-value-pairs: '{"white_label": "${{ steps.find-out-white-label.outputs.white_label }}", "short_board_name": "${{ steps.set-env-variables.outputs.short_board_name }}", "new_tag": "${{ steps.tag.outputs.new_tag }}"}'