Skip to content

Commit

Permalink
fix: Adjust base branch for PR and gitversion
Browse files Browse the repository at this point in the history
(cherry picked from commit 12047a7)
  • Loading branch information
jeromelaban authored and mergify[bot] committed Jun 21, 2024
1 parent 58248f8 commit eb8a05c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/actions/sdk-update/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: "SDK Update"
description: "Update Uno Sdk"

inputs:
branch: # id of input
description: 'base branch'
required: true
default: 'main'

runs:
using: "composite"
steps:
Expand All @@ -20,6 +26,7 @@ runs:
with:
useConfigFile: true
configFilePath: build/gitversion.yml
additionalArguments: -b "${{ inputs.branch }}"

- name: Run Uno Sdk Updater
run: dotnet run -c Release --project tools/Uno.Sdk.Updater
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/uno-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
id: targetbranch
run: |
if [[ "${{ matrix.branch }}" == "main" ]]; then
echo "::set-output name=targetbranch::sdk/update/dev"
echo "targetbranch=sdk/update/dev" >> $GITHUB_OUTPUT
else
versionNumber=$(echo "${{ matrix.branch }}" | cut -d'/' -f 3)
echo "::set-output name=targetbranch::sdk/update/release/$versionNumber"
echo "targetbranch=sdk/update/release/$versionNumber" >> $GITHUB_OUTPUT
fi
shell: bash

Expand All @@ -46,6 +46,7 @@ jobs:
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: ${{ matrix.branch }}
branch: ${{ steps.targetbranch.outputs.targetbranch }}
commit-message: 'chore: Update Uno.Sdk'
title: Uno.Sdk Update - ${{ matrix.branch }}
Expand Down

0 comments on commit eb8a05c

Please sign in to comment.