Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Update Version
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
datajson:
|
|
description: 'Version to update'
|
|
required: true
|
|
version:
|
|
description: 'Another version parameter'
|
|
required: true
|
|
buildType:
|
|
description: 'Build type (e.g., Master, Release)'
|
|
required: false
|
|
default: 'false'
|
|
jobs:
|
|
update-version:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
token: ${{ secrets.PERSONAL_TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.12.2
|
|
|
|
- name: Update version in versions.json
|
|
run: |
|
|
data="${{ github.event.inputs.datajson }}"
|
|
build_type="${{ github.event.inputs.buildType }}"
|
|
python3 update_version.py "$data" "$build_type"
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add versions.json
|
|
git commit -m "Added version ${{ github.event.inputs.version }}"
|
|
git push "https://${{ secrets.PERSONAL_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:main
|