mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
bd88727198
Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/setup-node` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/53b83947a5a98c8d113130e565377fae1a50d02f...48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
name: Update readme sponsor block
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
repository_dispatch:
|
|
types:
|
|
- webhook
|
|
schedule:
|
|
- cron: '0 1 * * *'
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
sponsors:
|
|
if: github.repository == 'axios/axios'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: git config
|
|
run: |
|
|
git config user.name "${GITHUB_ACTOR}"
|
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
- name: Setup node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 24.x
|
|
cache: npm
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
- name: Check if sponsors require updates
|
|
id: sponsors-requires-update
|
|
run: node ./scripts/update-readme-sponsors.mjs
|
|
- name: Check tracked README sponsor diff
|
|
id: readme-tracked-change
|
|
run: |
|
|
if git diff --quiet -- README.md; then
|
|
echo "readme_changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "readme_changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
- name: Read sponsors.md file content
|
|
run: |
|
|
echo 'CONTENT<<EOF' >> $GITHUB_ENV
|
|
cat ./temp/sponsors.md >> $GITHUB_ENV
|
|
echo 'EOF' >> $GITHUB_ENV
|
|
shell: bash
|
|
if: steps.sponsors-requires-update.outputs.changed == 'true' && steps.readme-tracked-change.outputs.readme_changed == 'true'
|
|
- name: Echo sponsors content
|
|
run: |
|
|
echo "$CONTENT"
|
|
if: steps.sponsors-requires-update.outputs.changed == 'true' && steps.readme-tracked-change.outputs.readme_changed == 'true'
|
|
- name: Create pull request
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
branch: sponsors
|
|
delete-branch: true
|
|
commit-message: 'chore(sponsor): update sponsor block'
|
|
title: 'chore(docs): update sponsor block'
|
|
body: |
|
|
**New sponsor block update:**
|
|
${{ env.CONTENT }}
|
|
labels: |
|
|
commit::docs
|
|
priority::high
|
|
type::automated-pr
|
|
signoff: false
|
|
draft: false
|
|
if: steps.sponsors-requires-update.outputs.changed == 'true' && steps.readme-tracked-change.outputs.readme_changed == 'true'
|