Fixed fast-forward
This commit is contained in:
13
action.yml
13
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
|
||||
|
||||
Reference in New Issue
Block a user