|
8 | 8 | - 'jq/*.sh' |
9 | 9 | types: |
10 | 10 | - labeled |
11 | | - - unlabeled |
12 | 11 | - opened |
13 | 12 | - edited |
14 | 13 | - reopened |
@@ -39,33 +38,25 @@ jobs: |
39 | 38 | if: contains(steps.changed-files.outputs.all_changed_files, 'shell-pipelines/ls-grep/script-01.sh') |
40 | 39 | run: ./test-sdc.sh shell-pipelines |
41 | 40 | shell: bash |
| 41 | + - name: make output comment |
| 42 | + if: contains(steps.changed-files.outputs.all_changed_files, 'individual-shell-tools/awk/script-01.sh') || contains(steps.changed-files.outputs.all_changed_files, 'jq/script-01.sh') || contains(steps.changed-files.outputs.all_changed_files, 'shell-pipelines/ls-grep/script-01.sh') |
| 43 | + env: |
| 44 | + GH_TOKEN: ${{ secrets.MY_TOKEN }} |
| 45 | + ISSUE_URL: ${{ github.event.issue.html_url }} |
| 46 | + run: | |
| 47 | + gh issue comment $ISSUE_URL --body-FILE testoutput.TXT |
42 | 48 | - name: read test output |
43 | 49 | if: contains(steps.changed-files.outputs.all_changed_files, 'individual-shell-tools/awk/script-01.sh') || contains(steps.changed-files.outputs.all_changed_files, 'jq/script-01.sh') || contains(steps.changed-files.outputs.all_changed_files, 'shell-pipelines/ls-grep/script-01.sh') |
44 | 50 | id: read-test-output |
45 | 51 | run: | |
46 | 52 | echo 'testoutput<<EOF' >> $GITHUB_OUTPUT |
47 | 53 | cat testoutput.txt >> $GITHUB_OUTPUT |
48 | 54 | echo EOF >> $GITHUB_OUTPUT |
49 | | -
|
50 | | - - name: make output comment |
51 | | - uses: peter-evans/create-or-update-comment@v5.0.0 |
52 | | - with: |
53 | | - issue-number: ${{ github.event.number }} |
54 | | - body: ${{ steps.read-test-output.outputs.testoutput }} |
55 | | - - uses: actions/github-script@v7 |
56 | | - id: update-labels |
| 55 | + - name: add appropriate labels |
57 | 56 | if: contains(steps.read-test-output.outputs.testoutput, 'complete!') |
58 | | - with: |
59 | | - script: | |
60 | | - await github.rest.issues.addLabels({ |
61 | | - owner: context.repo.owner, |
62 | | - repo: context.repo.repo, |
63 | | - issue_number: ${{ github.event.number }}, |
64 | | - labels: ["Complete"] |
65 | | - }); |
66 | | - await github.rest.issues.removeLabel({ |
67 | | - owner: context.repo.owner, |
68 | | - repo: context.repo.repo, |
69 | | - issue_number: ${{ github.event.number }}, |
70 | | - name: "Needs Review" |
71 | | - }); |
| 57 | + env: |
| 58 | + GH_TOKEN: ${{ secrets.MY_TOKEN }} |
| 59 | + ISSUE_URL: ${{ github.event.issue.html_url }} |
| 60 | + run: | |
| 61 | + gh issue edit $ISSUE_URL --add-label "Complete" |
| 62 | + gh issue edit $ISSUE_URL --remove-label "Needs Review" |
0 commit comments