mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
chore(action): fix sponsors action; (#6555)
This commit is contained in:
@@ -31,6 +31,13 @@ jobs:
|
|||||||
if: ${{ steps.sponsors.outputs.changed }}
|
if: ${{ steps.sponsors.outputs.changed }}
|
||||||
run: |
|
run: |
|
||||||
echo "Sponsor block has changed. Creating PR with updates..."
|
echo "Sponsor block has changed. Creating PR with updates..."
|
||||||
|
- name: Read sponsors.md file content
|
||||||
|
id: read_file
|
||||||
|
run: |
|
||||||
|
FILE_CONTENT=$(cat ./temp/sponsors.md)
|
||||||
|
echo "File content: $FILE_CONTENT"
|
||||||
|
echo "::set-output name=file_content::$FILE_CONTENT"
|
||||||
|
shell: bash
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
if: ${{ steps.sponsors.outputs.changed }}
|
if: ${{ steps.sponsors.outputs.changed }}
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@v6
|
||||||
@@ -42,7 +49,7 @@ jobs:
|
|||||||
title: '[Chore] Update sponsor block'
|
title: '[Chore] Update sponsor block'
|
||||||
body: |
|
body: |
|
||||||
**New sponsor block update:**
|
**New sponsor block update:**
|
||||||
{{ steps.sponsors.outputs.content }}
|
{{ steps.read_file.outputs.file_content }}
|
||||||
labels: |
|
labels: |
|
||||||
readme
|
readme
|
||||||
automated pr
|
automated pr
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules/
|
node_modules/
|
||||||
coverage/
|
coverage/
|
||||||
|
temp/
|
||||||
test/typescript/axios.js*
|
test/typescript/axios.js*
|
||||||
sauce_connect.log
|
sauce_connect.log
|
||||||
test/module/**/package-lock.json
|
test/module/**/package-lock.json
|
||||||
|
|||||||
+1
-1
@@ -58,6 +58,6 @@ const updateReadmeSponsors = async (url, path, marker = '<!--<div>marker</div>--
|
|||||||
|
|
||||||
await exec(`echo "tag=${newContent ? 'true' : 'false'}" >> $GITHUB_OUTPUT`);
|
await exec(`echo "tag=${newContent ? 'true' : 'false'}" >> $GITHUB_OUTPUT`);
|
||||||
if (newContent !== false) {
|
if (newContent !== false) {
|
||||||
await exec(`echo "content=${newContent}" >> $GITHUB_OUTPUT`);
|
await fs.writeFile('./temp/sponsors.md', newContent);
|
||||||
}
|
}
|
||||||
})('https://spontaneous-creponne-3ff312.netlify.app/data/sponsors.md');
|
})('https://spontaneous-creponne-3ff312.netlify.app/data/sponsors.md');
|
||||||
|
|||||||
Reference in New Issue
Block a user