11
11
steps :
12
12
- name : Get current date
13
13
id : date
14
- run : echo "::set-output name=date::$(date +'%Y-%m-%d')"
14
+ run : |
15
+ echo "TODAY=$(date +'%Y-%m-%d')" >> ${GITHUB_ENV}
16
+ echo "LOG_FILES=fern/apis/*/changelog/$TODAY.md" >> ${GITHUB_ENV}
17
+ - name : Check changelog
18
+ run : |
19
+ if ls $LOG_FILES >/dev/null 2>&1; then
20
+ l=($LOG_FILES)
21
+ echo "${l[@]} already exist."
22
+ gh run cancel
23
+ fi
15
24
- name : Check out repository content
16
25
uses : actions/checkout@v2
17
26
with :
@@ -35,33 +44,26 @@ jobs:
35
44
base : ' base/fern/apis/public/openapi-public.yaml'
36
45
revision : ' head/fern/apis/public/openapi-public.yaml'
37
46
format : text
38
- output-to-file : ' temp/public/${{ steps.date.outputs.date }}_oasdiff.md'
47
+ output-to-file : ' temp/public/${{ env.TODAY }}_oasdiff.md'
39
48
- name : Running beta OpenAPI Spec diff action
40
49
uses : oasdiff/oasdiff-action/diff@main
41
50
with :
42
51
base : ' base/fern/apis/beta/openapi-beta.yaml'
43
52
revision : ' head/fern/apis/beta/openapi-beta.yaml'
44
53
format : text
45
- output-to-file : ' temp/beta/${{ steps.date.outputs.date }}_oasdiff.md'
54
+ output-to-file : ' temp/beta/${{ env.TODAY }}_oasdiff.md'
46
55
- name : Archive changelogs
47
56
uses : actions/upload-artifact@v4
48
57
with :
49
- name : changelog-${{ steps.date.outputs.date }}
58
+ name : changelog-${{ env.TODAY }}
50
59
path : temp/**
51
60
- name : Prompt
52
61
env :
53
62
LLM_JWT : ${{ secrets.LLM_JWT }}
54
63
run : |
55
- logfiles="fern/apis/*/changelog/${{ steps.date.outputs.date }}.md"
56
-
57
- if ls $logfiles >/dev/null 2>&1; then
58
- logfiles=($logfiles)
59
- echo "${logfiles[@]} already exist."
60
- else
61
- python changelog.py --date ${{ steps.date.outputs.date }}
62
- git config user.name github-actions
63
- git config user.email [email protected]
64
- git add fern/apis/*/changelog/${{ steps.date.outputs.date }}.md
65
- git commit -m "generated by Claude"
66
- git push
67
- fi
64
+ python changelog.py --date ${{ env.TODAY }}
65
+ git config user.name github-actions
66
+ git config user.email [email protected]
67
+ git add ${{ env.LOG_FILES }}
68
+ git commit -m "generated by Claude"
69
+ git push
0 commit comments