ci: Fix merge conflicts cleanly (#12249)

This commit is contained in:
Chris S. Kim 2022-02-14 23:12:36 -05:00 committed by GitHub
parent 115946da99
commit e7d1ac0ce8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 13 deletions

View File

@ -747,20 +747,15 @@ jobs:
if ! git diff --quiet --exit-code HEAD^! ui/; then
git config --local user.email "github-team-consul-core@hashicorp.com"
git config --local user.name "hc-github-team-consul-core"
# stash newly built bindata_assetfs.go
git stash push
# checkout the CI branch and merge latest from main
git checkout ci/main-assetfs-build
git merge --no-edit main
git stash pop
# -B resets the CI branch to main which may diverge history
# but we will force push anyways.
git checkout -B ci/main-assetfs-build main
short_sha=$(git rev-parse --short HEAD)
git add agent/uiserver/bindata_assetfs.go
git commit -m "auto-updated agent/uiserver/bindata_assetfs.go from commit ${short_sha}"
git push origin ci/main-assetfs-build
git push --force origin ci/main-assetfs-build
else
echo "no UI changes so no static assets to publish"
fi
@ -1044,7 +1039,7 @@ workflows:
# verify-ci is a no-op workflow that must run on every PR. It is used in a
# branch protection rule to detect when CI workflows are not running.
verify-ci:
jobs: [noop]
jobs: [ noop ]
go-tests:
unless: << pipeline.parameters.trigger-load-test >>
@ -1067,17 +1062,17 @@ workflows:
- go-test-arm64: *filter-ignore-non-go-branches
- dev-build: *filter-ignore-non-go-branches
- go-test:
requires: [dev-build]
requires: [ dev-build ]
- go-test-lib:
name: "go-test-api go1.16"
path: api
go-version: "1.16"
requires: [dev-build]
requires: [ dev-build ]
- go-test-lib:
name: "go-test-api go1.17"
path: api
go-version: "1.17"
requires: [dev-build]
requires: [ dev-build ]
- go-test-lib:
name: "go-test-sdk go1.16"
path: sdk