File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11
11
with :
12
12
fetch-depth : 2
13
13
- name : get path of main.py
14
+ shell : bash
14
15
run : |
15
16
echo "path_of_main_py=$(git diff --name-only HEAD~1 HEAD | grep '/main\.py')" >> $GITHUB_ENV
16
17
- name : Check main.py exists
18
+ shell : bash
17
19
run : |
18
20
if [ -z ${{ env.path_of_main_py }} ]; then
19
21
echo "No main.py exists"
20
22
exit 1
21
23
fi
22
24
- name : Decorate path_of_main_py
23
- run : echo "path_of_main_py=https://github.com/skysign/WSAPT/blob/master/${{ env.path_of_main_py }}" >> $GITHUB_ENV
24
- - name : Print path_of_main_py
25
- run : echo "${{ env.path_of_main_py }}"
25
+ shell : bash
26
+ run : |
27
+ echo "path_of_main_py=https://github.com/skysign/WSAPT/blob/master/${{ env.path_of_main_py }}" >> $GITHUB_ENV
28
+ echo "${{ env.path_of_main_py }}"
29
+ - name : Get bitly-pat
30
+ shell : bash
31
+ id : get-bitly-pat
32
+ run : |
33
+ echo "BITLY_PAT=${{ secrets.BITLY_PAT }}" >> $GITHUB_OUTPUT
26
34
- name : Create bit.ly short url
27
35
shell : bash
28
36
env :
29
37
bitly_pat : ${{ secrets.BITLY_PAT }}
30
38
run : |
31
39
curl \
32
- -H "Authorization: ${{ env.bitly_pat }}" \
40
+ -H "Authorization: ${{ steps.get-bitly-pat.outputs.BITLY_PAT }}" \
33
41
-H "Content-Type: application/json" \
34
42
-X POST \
35
43
-d '{"long_url": "${{ env.path_of_main_py }}"}' \
You can’t perform that action at this time.
0 commit comments