From 58f08d94c3722c031350b0a7b81f4508288f2779 Mon Sep 17 00:00:00 2001 From: andry81 Date: Sun, 21 Nov 2021 04:43:58 +0300 Subject: [PATCH] fix `Required property is missing: shell` pipeline error --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 165c241..6bee8fc 100644 --- a/action.yml +++ b/action.yml @@ -56,17 +56,20 @@ runs: steps: # step is required to workaround variable expansion in variables - name: declare dependent variables + shell: bash run: | echo "stats_dir=${{ inputs.output_repo_dir }}" >> $GITHUB_ENV echo "stats_json=${{ inputs.output_repo_dir }}/latest.json" >> $GITHUB_ENV echo "stats_list_key=${{ inputs.stats_list_key }}" >> $GITHUB_ENV - name: allocate directories + shell: bash run: | mkdir $GITHUB_WORKSPACE/gh-workflow $GITHUB_WORKSPACE/gh-stats echo "WORKFLOW_TEMPDIR=$(mktemp -d)" >> $GITHUB_ENV - name: allocate variables + shell: bash run: | echo "write_error_to_file=$WORKFLOW_TEMPDIR/err.log" >> $GITHUB_ENV echo "write_warning_to_file=$WORKFLOW_TEMPDIR/warn.log" >> $GITHUB_ENV @@ -86,6 +89,7 @@ runs: token: ${{ inputs.output_repo_write_token }} - name: request ${{ inputs.stat_entity_path }} json + shell: bash run: | curl --user "${{ inputs.stat_repo_owner }}:${{ inputs.stat_repo_read_token }}" \ -H "Accept: application/vnd.github.v3+json" \ @@ -105,6 +109,7 @@ runs: - name: allocate error and warning variables if: steps.accum-stats.outcome != 'success' + shell: bash run: | # allocate variables here to make it visible in the next step [[ -f "$write_error_to_file" ]] && echo "error_string<> $GITHUB_ENV @@ -117,12 +122,14 @@ runs: - name: print errors and warnings if: steps.accum-stats.outcome != 'success' + shell: bash run: | [[ -n "$error_string" ]] && echo "::error ::$error_string" [[ -n "$warning_string" ]] && echo "::warning ::$warning_string" exit 255 - name: commit gh-stats + shell: bash run: | cd $GITHUB_WORKSPACE/gh-stats git add .