mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
chore(action): fix sponsors action; (#6555)
This commit is contained in:
@@ -31,6 +31,13 @@ jobs:
|
||||
if: ${{ steps.sponsors.outputs.changed }}
|
||||
run: |
|
||||
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
|
||||
if: ${{ steps.sponsors.outputs.changed }}
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
@@ -42,7 +49,7 @@ jobs:
|
||||
title: '[Chore] Update sponsor block'
|
||||
body: |
|
||||
**New sponsor block update:**
|
||||
{{ steps.sponsors.outputs.content }}
|
||||
{{ steps.read_file.outputs.file_content }}
|
||||
labels: |
|
||||
readme
|
||||
automated pr
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
coverage/
|
||||
temp/
|
||||
test/typescript/axios.js*
|
||||
sauce_connect.log
|
||||
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`);
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user