Skip to content

Commit

Permalink
Update blank.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soubinan authored Jan 11, 2025
1 parent 40f1823 commit 6ed76ed
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,22 @@ jobs:
id: all-templates-list
run: |
sudo apt-get install -y jq
echo all_files="$(ls templates/* | jq -Rsc 'split("\n")[:-1]')" | tee -a $GITHUB_OUTPUT
echo all_files="$(printf '%s' "$(ls templates/*)" | jq -Rsc 'split("\n")')" | tee -a $GITHUB_OUTPUT
if: ${{github.event_name}} != 'pull_request'

- name: List changed templates
id: changed-templates-list
id: all-changed-templates-list
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: true
files: templates/**
if: ${{github.event_name}} != 'pull_request'
if: ${{github.event_name}} == 'pull_request'

- name: Check templates list
id: check-templates-list
run: |
echo CHANGED_TEMPLATES=${{ steps.changed-templates-list.outputs.all_changed_files }}
echo ALL_TEMPLATES=${{ steps.all-templates-list.outputs.all_files }}
echo TEMPLATES_LIST=${{ steps.changed-templates-list.outputs.all_changed_files && steps.changed-templates-list.outputs.all_changed_files || steps.all-templates-list.outputs.all_files }}| tee -a $GITHUB_OUTPUT
ALL_TEMPLATES=${{ steps.all-templates-list.outputs.all_files }}
ALL_CHANGED_TEMPLATES=$(echo -n "${{ steps.all-changed-templates-list.outputs.all_changed_files }}" | jq -Rsc 'split(" ")')
echo TEMPLATES_LIST=${{ steps.all-changed-templates-list.outputs.all_changed_files && "$ALL_CHANGED_TEMPLATES" || "$ALL_TEMPLATES" }}| tee -a $GITHUB_OUTPUT
- name: Print templates list
run: |
Expand Down

0 comments on commit 6ed76ed

Please sign in to comment.