Skip to content

[CLIENT-4702] Add more regression tests to cover most of the code exa… #186

[CLIENT-4702] Add more regression tests to cover most of the code exa…

[CLIENT-4702] Add more regression tests to cover most of the code exa… #186

# Takes in a new version as input
# Changes the version in the whole repo and outputs the commit hash as output
name: Update version in repo
on:
push:
branches:
- 'dev*'
- 'master*'
# Only trigger on commits and not tags to avoid the workflow triggering itself
tags-ignore:
- '*'
workflow_dispatch:
inputs:
new_version:
type: string
description: Version string to set in the repo
required: true
dry-run:
required: false
default: false
type: boolean
description: No committing or tagging in repo
jobs:
update-version-in-repo:
permissions:
contents: write
name: Update version in repo
runs-on: ubuntu-22.04
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ secrets.CLIENT_BOT_PAT }}
fetch-depth: 0
- run: |
if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then
change_type="manual-override"
version_to_override="$NEW_VERSION"
elif [[ $GH_REF_NAME =~ dev* ]]; then
change_type="bump-dev-num"
else
change_type="strip_prerelease_part"
fi
./.github/workflows/update-version.bash "$change_type" "$version_to_override"
env:
DRY_RUN: ${{ inputs.dry-run && '1' || '' }}
NEW_VERSION: ${{ inputs.new_version }}
GH_REF_NAME: ${{ github.ref_name }}