forked from CodeYourFuture/Module-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.95 KB
/
test-sdc-tasks.yml
File metadata and controls
56 lines (52 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test SDC Tasks
on:
pull_request_target:
types:
- labeled
- unlabeled
- opened
- edited
- reopened
- synchronize
jobs:
test_sdc_tasks:
name: Test SDC Tasks
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: checkout pushed PR
uses: actions/checkout@v5
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47.0.5
- name: test individual shell tools
id: test-individual-shell-tools
if: contains(steps.changed-files.outputs.all_changed_files, 'individual-shell-tools/awk/script-01.sh')
run: ./test-sdc.sh individual-shell-tools
shell: bash
- name: test jq
id: test-jq
if: contains(steps.changed-files.outputs.all_changed_files, 'jq/script-01.sh')
run: ./test-sdc.sh jq
shell: bash
- name: test shell-pipelines
id: test-shell-pipelines
if: contains(steps.changed-files.outputs.all_changed_files, 'shell-pipelines/ls-grep/script-01.sh')
run: ./test-sdc.sh shell-pipelines
shell: bash
- name: make output comment
if: steps.test-individual-shell-tools.outputs.attempted == 'y' || steps.test-jq.outputs.attempted == 'y' || steps.test-shell-pipelines.outputs.attempted == 'y'
env:
GH_TOKEN: ${{ secrets.MY_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
run: |
gh issue comment $ISSUE_URL --body-FILE testoutput.TXT
- name: add appropriate labels
if: steps.test-individual-shell-tools.outputs.complete == 'y' || steps.test-jq.outputs.complete == 'y' || steps.test-shell-pipelines.outputs.complete == 'y'
env:
GH_TOKEN: ${{ secrets.MY_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
run: |
gh issue edit $ISSUE_URL --add-label "Complete"
gh issue edit $ISSUE_URL --remove-label "Needs Review"