-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (43 loc) · 1.75 KB
/
update_asf_tools_version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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@v2
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 "UAF-asf-apd@alaska.edu"
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 }}