@@ -63,31 +63,26 @@ jobs:
63
63
needs : [lts_needed, create_lts]
64
64
if : ${{!needs.lts_needed.outputs.no_release}}
65
65
steps :
66
- - name : Get Latest LTS Releases and Update the LTS config file
67
- run : |
68
- cat > lts.config.json <<< $(jq -r '[nth(0,1,2,3,4,5,6,7,8,9,10,11;.[] | select(.name | match(".+LTS")) | .name | rtrimstr("-LTS"))] | unique | reverse' <<< $(curl -Ls -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/Bandwidth/api-docs/releases))
69
- env :
70
- TOKEN : ${{ secrets.DX_GITHUB_TOKEN }}
66
+ - name : Checkout
67
+ uses : actions/checkout@v3
71
68
72
- - uses : actions/checkout@v3
69
+ - name : Configure Git and Create Branch
70
+ run : |
71
+ git config user.email "[email protected] "
72
+ git config user.name "DX-Bandwidth"
73
+ git checkout -b auto-update-lts
73
74
74
- - run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
75
+ - name : Get Latest LTS Releases and Update LTS Config File
76
+ run : |
77
+ cat > ./site/lts.config.json <<< $(jq -r '[nth(0,1,2,3,4,5,6,7,8,9,10,11;.[] | select(.name | match(".+LTS")) | .name | rtrimstr("-LTS"))] | unique | reverse' <<< $(curl -Ls -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/Bandwidth/api-docs/releases?per_page=100))
78
+ env :
79
+ GITHUB_TOKEN : ${{ secrets.DX_GITHUB_TOKEN }}
75
80
76
- - name : Create Pull Request
77
- id : lts-pr
78
- uses : peter-evans/create-pull-request@v4
79
- with :
80
- token : ${{ secrets.DX_GITHUB_TOKEN }}
81
- commit-message : Updating LTS Versions
82
- committer :
GitHub <[email protected] >
83
- author : ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
84
- branch : Auto-Update-LTS
85
- delete-branch : true
86
- title : ' Updating LTS Versions'
87
- body : |
88
- - Auto-generated for LTS Version Update Workflow
89
- labels : |
90
- automated pr
91
- draft : false
92
- env :
93
- GITHUB_TOKEN : ${{ secrets.DX_GITHUB_TOKEN }}
81
+ - name : Commit Changes and Create Pull Request
82
+ run : |
83
+ git add site/lts.config.json
84
+ git commit -m 'update lts table'
85
+ git push origin auto-update-lts
86
+ gh pr create -B main -H auto-update-lts --title 'Update LTS Versions Table' --body 'Auto-generated by Create LTS Versions Workflow'
87
+ env :
88
+ GITHUB_TOKEN : ${{ secrets.DX_GITHUB_TOKEN }}
0 commit comments