Skip to content

Commit

Permalink
update trigger.yml: Ensure json string is stored as a string
Browse files Browse the repository at this point in the history
  • Loading branch information
Soubinan committed Jan 11, 2025
1 parent d949ba2 commit ec4ed76
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ jobs:
run: |
sudo apt-get install -y jq
echo all_files="$(printf '%s' "$(ls templates/*)" | jq -Rsc 'split("\n")')" | tee -a $GITHUB_OUTPUT
echo all_changed_files=$(echo -n ${{ steps.all-changed-templates-list.outputs.all_changed_files }} | jq -Rsc 'split(" ")') | tee -a $GITHUB_OUTPUT
if: ${{github.event_name}} != 'pull_request'
echo all_changed_files=$(echo -n "${{ steps.all-changed-templates-list.outputs.all_changed_files }}" | jq -Rsc 'split(" ")') | tee -a $GITHUB_OUTPUT
- name: Check templates list
id: check-templates-list
run: |
echo all_files=${{ steps.all-templates-list.outputs.all_files }}
echo all_changed_files=${{ steps.all-templates-list.outputs.all_changed_files }}
echo TEMPLATES_LIST=${{ steps.all-templates-list.outputs.all_changed_files != '[]' && steps.all-templates-list.outputs.all_changed_files || steps.all-templates-list.outputs.all_files }} | tee -a $GITHUB_OUTPUT
echo all_files="${{ steps.all-templates-list.outputs.all_files }}"
echo all_changed_files="${{ steps.all-templates-list.outputs.all_changed_files }}"
echo TEMPLATES_LIST="${{ steps.all-templates-list.outputs.all_changed_files != '[]' && steps.all-templates-list.outputs.all_changed_files || steps.all-templates-list.outputs.all_files }}" | tee -a $GITHUB_OUTPUT
outputs:
templates_list: ${{steps.check-templates-list.outputs.TEMPLATES_LIST}}

Expand Down

0 comments on commit ec4ed76

Please sign in to comment.