Host version up and create PR #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Host version up and create PR | |
on: | |
workflow_dispatch: | |
inputs: | |
majorVersion: | |
description: 'Major Version e.g. 3' | |
required: true | |
targetVersion: | |
description: 'Target Version e.g. 3.1.1' | |
required: true | |
jobs: | |
createPR: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: dev | |
- id: createBranch | |
# Validate-hostVersion and validate-extbundle are custom scripts to ensure all images share the same version | |
# They can be safely removed if blocking a hotfix release. Ex. Only Python Images need to be updated. | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
cd host | |
./verify-pipelines.sh ${{ github.event.inputs.majorVersion }} | |
./update-version.sh ${{ github.event.inputs.majorVersion }} ${{ github.event.inputs.targetVersion }} | |
./validate-hostversion.sh ${{ github.event.inputs.majorVersion }} | |
./validate-extbundle.sh ${{ github.event.inputs.majorVersion }} | |
git add . | |
git commit -m "Update Version ${{ github.event.inputs.targetVersion }}" | |
- name: Create PullRequest | |
id: createPullRequest | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
title: Update to version ${{ github.event.inputs.targetVersion }} | |
body: | | |
- Update ${{ github.event.inputs.majorVersion}} to ${{ github.event.inputs.targetVersion }} | |
branch: action/release.${{ github.event.inputs.targetVersion }} | |
labels: | | |
automated pr | |
dependencies | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.createPullRequest.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.createPullRequest.outputs.pull-request-url }}" | |