Commit a56424a Ahmad Nassri
committed
1 parent c17b980 commit a56424a Copy full SHA for a56424a
File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 46
46
47
47
This action will output the following properties:
48
48
49
+ <!-- markdownlint-capture -->
50
+
51
+ <!-- markdownlint-disable MD034 -->
52
+
49
53
| property | example |
50
54
|-------------------------------------|------------------------------------------------------------|
51
55
| ` repository_json` | { ... } **full** JSON object of the current repository |
@@ -54,7 +58,7 @@ This action will output the following properties:
54
58
| `repository_full_name` | ahmadnassri/action-metadata |
55
59
| `repository_private` | false |
56
60
| `repository_html_url` | <https://github.com/ahmadnassri/action-metadata> |
57
- | `repository_description` | get all the repo and event metadata for use in Actions |
61
+ | `repository_description` | get all the repository metadata for use in Actions |
58
62
| `repository_fork` | false |
59
63
| `repository_git_url` | git://github.com/ahmadnassri/action-metadata.git |
60
64
| `repository_ssh_url` | <[email protected] >:ahmadnassri/action-metadata.git |
@@ -100,6 +104,8 @@ This action will output the following properties:
100
104
| `template_repository_full_name` | ahmadnassri/template-action-composite |
101
105
| `template_repository_html_url` | <https://github.com/ahmadnassri/template-action-composite> |
102
106
107
+ <!-- markdownlint-restore -->
108
+
103
109
[context] : https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
104
110
105
111
----
Original file line number Diff line number Diff line change 38
38
39
39
This action will output the following properties:
40
40
41
+ <!-- markdownlint-capture -->
42
+ <!-- markdownlint-disable MD034 -->
41
43
| property | example |
42
44
| ----------------------------------- | -------------------------------------------------------- |
43
45
| ` repository_json` | { ... } **full** JSON object of the current repository |
@@ -46,7 +48,7 @@ This action will output the following properties:
46
48
| `repository_full_name` | ahmadnassri/action-metadata |
47
49
| `repository_private` | false |
48
50
| `repository_html_url` | https://github.com/ahmadnassri/action-metadata |
49
- | `repository_description` | get all the repo and event metadata for use in Actions |
51
+ | `repository_description` | get all the repository metadata for use in Actions |
50
52
| `repository_fork` | false |
51
53
| `repository_git_url` | git://github.com/ahmadnassri/action-metadata.git |
52
54
| `repository_ssh_url` | [email protected] :ahmadnassri/action-metadata.git |
@@ -91,3 +93,4 @@ This action will output the following properties:
91
93
| `template_repository_name` | template-action-composite |
92
94
| `template_repository_full_name` | ahmadnassri/template-action-composite |
93
95
| `template_repository_html_url` | https://github.com/ahmadnassri/template-action-composite |
96
+ <!-- markdownlint-restore -->
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ PROPS_PREFIX[LICENSE]="license"
14
14
PROPS_PREFIX[TEMPLATE_REPO]=" template_repository"
15
15
16
16
# props we want to export
17
+ # shellcheck disable=SC2034
17
18
REPO_PROPS=(
18
19
" id"
19
20
" name"
@@ -55,6 +56,7 @@ REPO_PROPS=(
55
56
" network_count"
56
57
)
57
58
59
+ # shellcheck disable=SC2034
58
60
OWNER_PROPS=(
59
61
" id"
60
62
" login"
@@ -63,12 +65,14 @@ OWNER_PROPS=(
63
65
" type"
64
66
)
65
67
68
+ # shellcheck disable=SC2034
66
69
LICENSE_PROPS=(
67
70
" key"
68
71
" name"
69
72
" spdx_id"
70
73
)
71
74
75
+ # shellcheck disable=SC2034
72
76
TEMPLATE_REPO_PROPS=(
73
77
" id"
74
78
" name"
@@ -89,7 +93,7 @@ for PREFIX in "${!PROPS_PREFIX[@]}"; do
89
93
KEY=" ${PROPS_PREFIX[$PREFIX]} "
90
94
declare -n PROPS_ARRAY=${VARNAME}
91
95
for PROP in " ${PROPS_ARRAY[@]} " ; do
92
- [[ $KEY = " repository" ]] && JQ_KEY=" " || JQ_KEY=" .${KEY} "
93
- echo ::set-output name=${KEY} _${PROP} ::" $( echo $ JSON | jq -r ${JQ_KEY} .${PROP} ) "
96
+ [[ $KEY = " repository" ]] && JQ_KEY=" " || JQ_KEY=" .${KEY} "
97
+ echo ::set-output name=${KEY} _${PROP} ::" $( echo " ${ JSON} " | jq -r ${JQ_KEY} .${PROP} ) "
94
98
done
95
99
done
You can’t perform that action at this time.
0 commit comments