-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
43 lines (42 loc) · 2.18 KB
/
action.yaml
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
name: 'File Copy'
description: 'Pretends to copy some files and return the number of files copied'
inputs:
destinationFolder: # path
description: 'The folder to copy the files to'
required: true
default: '~'
outputs:
copied-files:
description: "Number of files copied"
value: ${{ steps.random-number-generator.outputs.filesNo }}
newall:
value: ${{ steps.clusters.outputs.new-all }}
newdev:
value: ${{ steps.clusters.outputs.new-dev }}
newtest:
value: ${{ steps.clusters.outputs.new-test }}
testmessage:
value: ${{ steps.clusters.outputs.test-msg }}
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- run: ${{ github.action_path }}/ExecuteSomething.sh
shell: bash
- id: random-number-generator
run: echo "::set-output name=filesNo::$(echo $RANDOM)"
shell: bash
- run: ${{ github.action_path }}/CopyFiles.sh
shell: bash
- id: clusters
run: |
echo "::set-output name=new-all::$( echo $(git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r ${{ github.sha }} |grep -i new |grep -iv ".github" |grep -iv .md |grep -iv images |grep -iv examples | jq -R -s -c 'split("\n")[:-1]'))"
echo "::set-output name=test-msg::$(echo "Hello kali")"
echo "::set-output name=new-dev::$( git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r ${{ github.sha }} |grep -i new |grep -i egdp-dev |grep -iv ".github" |grep -iv .md |grep -iv images |grep -iv examples | jq -R -s -c 'split("\n")[:-1]')"
echo "::set-output name=new-test::$( git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r ${{ github.sha }} |grep -i new |grep -i egdp-test |grep -iv ".github" |grep -iv .md |grep -iv images |grep -iv examples | jq -R -s -c 'split("\n")[:-1]')"
shell: bash
- run: echo ${{ steps.clusters.outputs.new-all }}
shell: bash
- run: echo random ${{ steps.random-number-generator.outputs.filesNo }}
shell: bash
# echo "::set-output name=update::$( git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r ${{ github.sha }} |grep -iv new |grep -iv ".github" |grep -iv .md |grep -iv images |grep -iv examples | jq -R -s -c 'split("\n")[:-1]')"