Fix pre-commit hook
This commit is contained in:
parent
a374ac58b3
commit
92b62799f4
@ -1,5 +1,5 @@
|
||||
- id: shlaxfile-gitlabci
|
||||
name: Regenerate .gitlab-ci.yml
|
||||
description: Regenerate gitlabci
|
||||
entry: pip install -e . && ./shlaxfile.py gitlabci
|
||||
entry: ./shlaxfile.py gitlabci
|
||||
language: python
|
||||
|
||||
@ -159,8 +159,12 @@ class Buildah(Localhost):
|
||||
async def push(self):
|
||||
user = os.getenv('DOCKER_USER')
|
||||
passwd = os.getenv('DOCKER_PASS')
|
||||
if user and passwd and os.getenv('CI') and self.image.registry:
|
||||
await self.exec('buildah', 'login', '-u', user, '-p', passwd, self.image.registry)
|
||||
if user and passwd and os.getenv('CI'):
|
||||
self.output.cmd('buildah', 'login', '-u', '...', '-p', '...', self.image.registry)
|
||||
old = self.output.debug
|
||||
self.output.debug = False
|
||||
await self.exec('buildah', 'login', '-u', user, '-p', passwd, self.image.registry or 'docker.io', )
|
||||
self.output.debug = old
|
||||
for tag in self.image.tags:
|
||||
await self.exec('buildah', 'push', f'{self.image.repository}:{tag}')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user