From 18afd5023b60735a2bb86b0bd1359e4556ec8dec Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Wed, 17 Jan 2024 22:48:59 +0100 Subject: [PATCH] GHA packaging: Rework Sync changes. Signed-off-by: s3rj1k --- .github/workflows/cd-libs-metadata.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd-libs-metadata.yml b/.github/workflows/cd-libs-metadata.yml index 6cbc6d39..f43453b8 100644 --- a/.github/workflows/cd-libs-metadata.yml +++ b/.github/workflows/cd-libs-metadata.yml @@ -67,7 +67,7 @@ jobs: steps: - name: Checkout metadatarepo uses: actions/checkout@v4 - continue-on-error: true + continue-on-error: false id: metabranch with: repository: ${{ inputs.TARGET_REPO }} @@ -97,11 +97,9 @@ jobs: - name: Sync changes shell: sh run: | - git checkout ${{ inputs.LIB_NAME }}/${{ inputs.TARGET_OS }}/${{ inputs.TARGET_PLATFORM }} - git pull - git status --porcelain && exit 0 - git add metafile.txt + git status --porcelain | grep -q . || exit 0 git config --global user.email "github-actions@github.com" git config --global user.name "github-actions" - git commit -m "update metadata" - git push + git add -v metafile.txt + git commit --branch -m "update metadata" + git push --atomic -v