update-examples #3
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: Update examples version | |
on: | |
repository_dispatch: | |
types: [ update-examples ] | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
update-examples-version: | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
- run: | | |
$oldTag = "${{ github.event.client_payload.oldTag }}" | |
$newTag = "${{ github.event.client_payload.newTag }}" | |
. .\update-version.ps1 # Import the functions | |
dir -r .github\**\*.yml | % { update-md-files $_ -OldVersion $oldTag -NewVersion $newTag } | |
dir -r .azure\**\*.yml | % { update-md-files $_ -OldVersion $oldTag -NewVersion $newTag } | |
git add --verbose . | |
git config user.name 'Artur Stolear' | |
git config user.email '[email protected]' | |
git commit -m "update examples version to $newTag" --allow-empty | |
git push --force | |
name: Update examples version |