Skip to content

[Testing] Enabling ported UITests from Xamarin.UITests to Appium - 18… #3934

[Testing] Enabling ported UITests from Xamarin.UITests to Appium - 18…

[Testing] Enabling ported UITests from Xamarin.UITests to Appium - 18… #3934

name: Notify release branch change
on:
# trigger for main and release branches.
push:
branches:
- main
- net8.0
- 'release/**'
workflow_dispatch:
inputs:
brach:
description: 'The dotnet maui branch the contains the commit.'
required: true
type: string
commit:
description: 'The hash to be used to bump the sdk insertion.'
required: true
type: string
commit_title:
description: 'The commit title to be used for the bump.'
required: true
type: string
jobs:
pingRemote:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# because we want to be able to execute the action manually, we need diff steps
# depending on the event that triggered the action. If we are executing the event
# manually we want to parse the given data and add it to the variables, els we just
# copy what we got from the push
# if manual trigger
- name: 'Update remote repository from manual trigger'
uses: peter-evans/repository-dispatch@v2
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
token: ${{ secrets.MEGAPIPELINE_PAT }}
event-type: 'sdk_insertion'
repository: 'xamarin/sdk-insertions'
client-payload: '{"repository": "dotnet/maui", "branch": "${{ inputs.branch }}", "commit": "${{ inputs.commit }}", "commit_message": "${{ inputs.commit_title }}"}'
# if push event
- name: Parse commit
shell: pwsh
id: commit_title
if: ${{ github.event_name == 'push' }}
run: |
Write-Host "Commit message is $Env:COMMIT_MESSAGE"
$title = ($Env:COMMIT_MESSAGE -split '\n')[0] | ConvertTo-Json
"COMMIT_TITLE=$title" >> $env:GITHUB_OUTPUT
env:
COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
- name: 'Update remote repository from push event'
uses: peter-evans/repository-dispatch@v2
if: ${{ github.event_name == 'push' }}
with:
token: ${{ secrets.MEGAPIPELINE_PAT }}
event-type: 'sdk_insertion'
repository: 'xamarin/sdk-insertions'
client-payload: '{"repository": "dotnet/maui", "branch": "${{ github.ref_name }}", "commit": "${{ github.sha }}", "commit_message": ${{ steps.commit_title.outputs.COMMIT_TITLE }} }'