11name : Test SDC Tasks
22
33on :
4- # push:
5- # paths:
6- # - 'individual-shell-tools/**.sh'
7- # - 'shell-pipelines/**.sh'
8- # - 'jq/*.sh'
9- # pull_request:
10- # # paths: # i think its not working because paths are never updated if the type is updated
11- # # - 'individual-shell-tools/**.sh'
12- # # - 'shell-pipelines/**.sh'
13- # # - 'jq/*.sh'
14- # types:
15- # - labeled
16- # - unlabeled
17- # - opened
18- # - edited
19- # - reopened
204 pull_request_target :
21- # paths:
22- # - 'individual-shell-tools/**.sh'
23- # - 'shell-pipelines/**.sh'
24- # - 'jq/*.sh'
5+ paths :
6+ - ' individual-shell-tools/**.sh'
7+ - ' shell-pipelines/**.sh'
8+ - ' jq/*.sh'
259 types :
2610 - labeled
2711 - unlabeled
4327 - name : Get changed files
4428 id : changed-files
4529 uses : tj-actions/changed-files@v47.0.5
46- - name : List all changed files
47- env :
48- ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
49- run : |
50- for file in ${ALL_CHANGED_FILES}; do
51- echo "$file was changed"
52- done
5330 - name : test individual shell tools
5431 if : contains(steps.changed-files.outputs.all_changed_files, 'individual-shell-tools/awk/script-01.sh')
5532 run : ./test-sdc.sh individual-shell-tools
@@ -69,21 +46,11 @@ jobs:
6946 echo 'testoutput<<EOF' >> $GITHUB_OUTPUT
7047 cat testoutput.txt >> $GITHUB_OUTPUT
7148 echo EOF >> $GITHUB_OUTPUT
72- # - uses: actions/github-script@v7
73- # id: get_pr_data
74- # with: # this isn't going to work with a fork pr
75- # script: |
76- # return (
77- # await github.rest.repos.listPullRequestsAssociatedWithCommit({
78- # commit_sha: context.sha,
79- # owner: context.repo.owner,
80- # repo: context.repo.repo,
81- # })
82- # ).data[0];
49+
8350 - name : make output comment
8451 uses : peter-evans/create-or-update-comment@v5.0.0
8552 with :
86- issue-number : ${{ github.event.number }} # ${{ fromJson(steps.get_pr_data.outputs.result).number }}
53+ issue-number : ${{ github.event.number }}
8754 body : ${{ steps.read-test-output.outputs.testoutput }}
8855 - uses : actions/github-script@v7
8956 id : update-labels
0 commit comments