Skip to content

Commit

Permalink
chore(action): fix sponsors action; (axios#6555)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS authored Aug 17, 2024
1 parent 3dde8fc commit a909e38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/sponsors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.DS_Store
node_modules/
coverage/
temp/
test/typescript/axios.js*
sauce_connect.log
test/module/**/package-lock.json
Expand Down
2 changes: 1 addition & 1 deletion bin/sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit a909e38

Please sign in to comment.