From 8cd4e1c57dc865a590c79ffdbafd66c0e73a4184 Mon Sep 17 00:00:00 2001 From: Skydust Date: Fri, 27 Dec 2024 11:58:16 +0100 Subject: [PATCH] Fixed fast-forward --- action.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 9aad223..87df257 100644 --- a/action.yml +++ b/action.yml @@ -52,20 +52,21 @@ runs: log_info "New version: ${NEW_VERSION}" echo NEW_VERSION=${NEW_VERSION} >> $GITEA_ENV - - name: Pushing new version + - name: Setting up release git account run: | git config user.email "release@example.com" git config user.name "Release" - + log_info "Overriding git repository auth with PAT" - + repo_url="$(git remote get-url origin)" repo_url="${repo_url#https://}" # Remove HTTPS GIT_NEW_URL="https://${GITHUB_REPOSITORY_OWNER}:${{ inputs.token }}@${repo_url}.git" - + git remote set-url origin "$GIT_NEW_URL" git config --local --unset http.https://${GITHUB_SERVER_URL#https://}/.extraheader - + - name: Pushing new version + run: | log_info "Pushing new tag" git fetch git tag -a "v${NEW_VERSION}" -m "Release version ${NEW_VERSION}" @@ -74,5 +75,5 @@ runs: run: | log_info "Fast-forwarding master to dev" git checkout master - git merge --ff-only origin/dev + git merge --ff-only dev git push --force-with-lease