add git config for static assets (#8777)

* add git config for static assets

* add commit sha to static-asset auto commit
This commit is contained in:
Alvin Huang 2020-09-30 11:12:36 -04:00 committed by GitHub
parent 207491eaa7
commit 823d6dadbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -644,8 +644,12 @@ jobs:
name: commit agent/bindata_assetfs.go if there are changes name: commit agent/bindata_assetfs.go if there are changes
command: | command: |
if ! git diff --exit-code agent/bindata_assetfs.go; then if ! git diff --exit-code agent/bindata_assetfs.go; then
git config --local user.email "hashicorp-ci@users.noreply.github.com"
git config --local user.name "hashicorp-ci"
short_sha=$(git rev-parse --short HEAD)
git add agent/bindata_assetfs.go git add agent/bindata_assetfs.go
git commit -m "auto-updated agent/bindata_assetfs.go" git commit -m "auto-updated agent/bindata_assetfs.go from commit ${short_sha}"
git push origin master git push origin master
else else
echo "no new static assets to publish" echo "no new static assets to publish"