Skip to content

Commit

Permalink
add example workflow that updates to latest version the tasks/actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jul 25, 2024
1 parent 1be4fce commit 95b7eff
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/examples-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 }}"
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

0 comments on commit 95b7eff

Please sign in to comment.