-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1468 from arturcic/feature/action-test
Refactor workflows to add and utilize trigger-action-test.
- Loading branch information
Showing
3 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: 'Trigger Action Test' | ||
description: 'Test the actions/tasks in the action-test repository' | ||
inputs: | ||
mode: | ||
description: 'Release mode' | ||
required: true | ||
majorMinorPatch: | ||
description: 'Major.Minor.Patch version' | ||
required: true | ||
token: | ||
description: 'Token for Azure DevOps' | ||
required: true | ||
|
||
outputs: | ||
oldTag: | ||
description: 'Old tag' | ||
value: ${{ steps.get-tags.outputs.oldTag }} | ||
newTag: | ||
description: 'New tag' | ||
value: ${{ steps.get-tags.outputs.newTag }} | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Get tags | ||
id: get-tags | ||
shell: pwsh | ||
run: | | ||
# Finding the version from release tag | ||
$newTag = "${{ inputs.majorMinorPatch }}" | ||
$oldTag = cat package.json | ConvertFrom-Json | Select-Object -ExpandProperty version | ||
echo "Old tag: $oldTag" | ||
echo "New tag: $newTag" | ||
"oldTag=$oldTag" >> $env:GITHUB_OUTPUT | ||
"newTag=$newTag" >> $env:GITHUB_OUTPUT | ||
- uses: peter-evans/repository-dispatch@v3 | ||
name: Trigger Update Examples version (actions-test) | ||
with: | ||
token: ${{ inputs.token }} | ||
repository: ${{ github.repository_owner }}/actions-test | ||
event-type: update-examples-${{ inputs.mode }} | ||
client-payload: '{"oldTag": "${{ steps.get-tags.outputs.oldTag }}", "newTag": "${{ steps.get-tags.outputs.newTag }}"}' |
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
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