From 1e989189784dd9eb70e1e2d835ead3a200b958f6 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Thu, 25 Jan 2024 18:37:47 +0100 Subject: [PATCH] Use source branch name in metarepo branch name. --- .github/workflows/cd-libs-metadata.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-libs-metadata.yml b/.github/workflows/cd-libs-metadata.yml index 7769230e..b44c5d7c 100644 --- a/.github/workflows/cd-libs-metadata.yml +++ b/.github/workflows/cd-libs-metadata.yml @@ -24,6 +24,11 @@ on: # default: '' # description: File full-path # type: string + SOURCE_BRANCH: + required: true + default: '' + description: The source branch name. + type: string TARGET_REPO: required: true default: '' @@ -76,7 +81,7 @@ jobs: id: metabranch with: repository: ${{ inputs.TARGET_REPO }} - ref: ${{ inputs.LIB_NAME }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} + ref: ${{ inputs.LIB_NAME }}/${{ inputs.SOURCE_BRANCH }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} # ssh-key: ${{ secrets.GH_BOT_DEPLOY_KEY }} token: ${{ secrets.GH_BOT_DEPLOY_TOKEN || github.token }} @@ -93,8 +98,8 @@ jobs: - name: Create remote if: steps.metabranch.outcome != 'success' run: | - git checkout -b ${{ inputs.LIB_NAME }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} - git push --set-upstream origin ${{ inputs.LIB_NAME }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} + git checkout -b ${{ inputs.LIB_NAME }}/${{ inputs.SOURCE_BRANCH }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} + git push --set-upstream origin ${{ inputs.LIB_NAME }}/${{ inputs.SOURCE_BRANCH }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} - name: Download Artifacts uses: actions/download-artifact@v4