Merge pull request #110 from prometheus-community/superq/more_auto_fixes

skip_changelog: More fixes to version bumper
This commit is contained in:
gardar 2023-05-20 01:54:32 +00:00 committed by GitHub
commit e360c2efdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -81,6 +81,13 @@ yq eval -i ".argument_specs.main.options.${role}_version.default = \"${version}\
update_branch="autoupdate/${role}/${version}"
remote_branch="$(github_api "repos/${GIT_REPO}/branches/${update_branch}" | jq -r .name)"
if [[ -n "${remote_branch}" ]] ; then
echo_yellow "Branch is already on remote."
exit 0
fi
# Push new version
git config user.email "${GIT_MAIL}"
git config user.name "${GIT_USER}"
@ -92,8 +99,8 @@ git add \
git commit -m 'patch: :tada: automated upstream release update'
echo_green "Pushing to ${update_branch} branch in ${role}"
if ! git push "https://${GITHUB_TOKEN}:@github.com/${GIT_REPO}" --set-upstream "${update_branch}"; then
echo_yellow "Branch is already on remote."
exit 0
echo_yellow "Branch push failed."
exit 1
fi
if ! post_pull_request \

View file

@ -27,6 +27,7 @@ jobs:
needs: discover-role-repos
permissions:
contents: write
pull-request: write
container:
image: quay.io/prometheus/golang-builder:base
env: