Skip to content

Commit cb075dd

Browse files
committed
#4725 - adds workflow to update GitTools Actions
adds workflow to update GitTools Actions in Actions repository when a new release is published.
1 parent 1419e4b commit cb075dd

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Update GitTools Actions
2+
3+
on:
4+
workflow_dispatch:
5+
repository_dispatch:
6+
types: [ publish-release ]
7+
8+
defaults:
9+
run:
10+
shell: pwsh
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
homebrew:
17+
permissions:
18+
contents: none
19+
name: Update GitTools Actions
20+
runs-on: ubuntu-24.04
21+
steps:
22+
-
23+
name: Get version
24+
id: get-version
25+
shell: pwsh
26+
run: |
27+
$version = "${{ github.event.client_payload.tag }}"
28+
if ($version -eq "") {
29+
$version = "${{ github.event.inputs.tag-name }}"
30+
}
31+
"version=$version" >> $env:GITHUB_OUTPUT
32+
-
33+
uses: peter-evans/repository-dispatch@v4
34+
name: Update GitTools Actions
35+
with:
36+
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
37+
repository: ${{ github.repository_owner }}/actions
38+
event-type: gitversion-update-examples
39+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}'

build/CI.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<File Path="../.github/workflows/codeql-analysis.yml" />
4141
<File Path="../.github/workflows/docs.yml" />
4242
<File Path="../.github/workflows/format.yml" />
43+
<File Path="../.github/workflows/gittools-actions.yml" />
4344
<File Path="../.github/workflows/homebrew.yml" />
4445
<File Path="../.github/workflows/mkdocs.yml" />
4546
<File Path="../.github/workflows/new-cli.yml" />

0 commit comments

Comments
 (0)