Skip to content

Update ASF Tools version #14

Update ASF Tools version

Update ASF Tools version #14

name: Update ASF Tools version
on:
workflow_dispatch:
inputs:
asf_tools_version:
description: 'The new version of ASF Tools'
required: true
jobs:
bump_sdk_version:
name: Bump the ASF Tools version
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.TOOLS_BOT_PAK }}
- name: create patch branch
id: patch
env:
ASF_TOOLS_VERSION: ${{ github.event.inputs.asf_tools_version }}
PATCH_BRANCH: bump-asf-tools-${{ github.event.inputs.asf_tools_version }}
run: |
git config user.name "tools-bot"
git config user.email "[email protected]"
echo "::set-output name=branch::${PATCH_BRANCH}"
git checkout -b ${PATCH_BRANCH}
sed -i -r "s|asf-tools/v[0-9]+\.[0-9]+\.[0-9]+|asf-tools/${ASF_TOOLS_VERSION}|" docs/tools/asf_tools.md
sed -i -r "s|\`asf_tools\` \*v[0-9]+\.[0-9]+\.[0-9]+\*|\`asf_tools\` \*${ASF_TOOLS_VERSION}\*|" docs/tools/asf_tools_api.md
sed -i -r "s|asf_tools=[0-9]+\.[0-9]+\.[0-9]+|asf_tools=${ASF_TOOLS_VERSION#v}|" environment.yml
git commit -am "Bump ASF Tools version to ${ASF_TOOLS_VERSION}"
git push origin ${PATCH_BRANCH}
- name: open PR
uses: repo-sync/pull-request@v2
with:
source_branch: ${{ steps.patch.outputs.branch }}
destination_branch: main
pr_title: Update ASF Tools version to ${{ github.event.inputs.asf_tools_version }}
pr_body: |
PR created by a `workflow_dispatch` event
pr_assignee: ASFHyP3/tools
pr_label: tools-bot
pr_draft: false
pr_allow_empty: true
github_token: ${{ secrets.TOOLS_BOT_PAK }}