forked from platypush/platypush
Backup/restore the git configuration in the build-ui step.
This is to ensure that following steps that depend on the default username and email (e.g. the AUR release step) won't fail because of mismatching identities.
This commit is contained in:
parent
39fb3026bf
commit
8b245a1618
1 changed files with 5 additions and 0 deletions
|
@ -135,6 +135,8 @@ steps:
|
||||||
- chmod 0600 ~/.ssh/id_rsa
|
- chmod 0600 ~/.ssh/id_rsa
|
||||||
- ssh-keyscan git.platypush.tech >> ~/.ssh/known_hosts 2>/dev/null
|
- ssh-keyscan git.platypush.tech >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
|
||||||
|
# Backup the original git configuration before changing name and email
|
||||||
|
- cp .git/config /tmp/git.config.orig
|
||||||
- git config user.name "Platypush CI/CD Automation"
|
- git config user.name "Platypush CI/CD Automation"
|
||||||
- git config user.email "admin@platypush.tech"
|
- git config user.email "admin@platypush.tech"
|
||||||
- git config commit.gpgsign true
|
- git config commit.gpgsign true
|
||||||
|
@ -145,6 +147,9 @@ steps:
|
||||||
- git remote add origin git@git.platypush.tech:platypush/platypush.git
|
- git remote add origin git@git.platypush.tech:platypush/platypush.git
|
||||||
- git push origin master
|
- git push origin master
|
||||||
|
|
||||||
|
# Restore the original git configuration
|
||||||
|
- mv /tmp/git.config.orig .git/config
|
||||||
|
|
||||||
- name: update-arch-packages
|
- name: update-arch-packages
|
||||||
image: python:3.11-alpine
|
image: python:3.11-alpine
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue