File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 11name : Check Next Version
2+ env :
3+ JSON_FILE : organized-next.json
24
35on :
46 push :
4547 echo "VERSION=$VERSION" >> $GITHUB_ENV
4648 echo "Extracted version: $VERSION"
4749
48- - name : Create organized-next.json
50+ - name : Create $JSON_FILE
4951 run : |
50- cat <<EOF > organized-next.json
52+ cat <<EOF > $JSON_FILE
5153 {
5254 "schemaVersion": 1,
5355 "label": "next version",
@@ -63,10 +65,11 @@ jobs:
6365 GIST_ID : 8d98acc3c934ff9dc191a0131135c4cb
6466 GIST_TOKEN : ${{ secrets.GIST_TOKEN }}
6567 run : |
66- FILE_NAME="organized-next.json"
67- cat $FILE_NAME
68- JSON_CONTENT=$(jq -c . < $FILE_NAME)
69- curl -X PATCH "https://api.github.com/gists/${GIST_ID}" \
70- -H "Authorization: token ${GIST_TOKEN}" \
71- -H "Content-Type: application/json" \
72- -d "{\"files\": {\"$FILE_NAME\": {\"content\": \"$JSON_CONTENT\"}}}"
68+ JSON_CONTENT=$(jq -c . < $JSON_FILE)
69+ curl -L \
70+ -X PATCH \
71+ -H "Accept: application/vnd.github+json" \
72+ -H "Authorization: Bearer $GIST_TOKEN" \
73+ -H "X-GitHub-Api-Version: 2022-11-28" \
74+ https://api.github.com/gists/$GIST_ID \
75+ -d '$JSON_CONTENT'
You can’t perform that action at this time.
0 commit comments