Skip to content

feat: 与 Python 后端交互 #80

feat: 与 Python 后端交互

feat: 与 Python 后端交互 #80

name: Increase build number on pull request
on:
pull_request:
branches:
- main
permissions:
contents: write
jobs:
increase-build-number:
if: "!startsWith(github.event.pull_request.title, 'ci:')"
name: Increase build number
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Increase build number
id: increase-build-number
run: |
buildNumber=$(grep buildNumber= build-number.properties | cut -d'=' -f2)
buildNumber=$((buildNumber+1))
sed -i "s/buildNumber=.*/buildNumber=$buildNumber/" build-number.properties
echo "buildNumber=$buildNumber" >> $GITHUB_OUTPUT
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add build-number.properties
git commit -m "chore: increase build number to ${{ steps.increase-build-number.outputs.buildNumber }}"
git push