diff options
| author | diogo464 <[email protected]> | 2025-07-22 22:27:29 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-07-22 22:27:29 +0100 |
| commit | 420fa3254eb18784fc115003bfa8953060445d74 (patch) | |
| tree | 8c0b7f16b76f30dfa901fdcfb49985470f2dc89c /build.sh | |
| parent | 5b2a84f71c5996399204edb3ebd4ead24f7be0bf (diff) | |
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,7 +1,9 @@ | |||
| 1 | #!/usr/bin/sh | 1 | #!/usr/bin/sh |
| 2 | 2 | ||
| 3 | IMAGE_NAME=cr.d464.sh/whoami:latest | ||
| 4 | |||
| 3 | CGO_ENABLED=0 go build . || exit 1 | 5 | CGO_ENABLED=0 go build . || exit 1 |
| 4 | docker build -t git.d464.sh/code/whoami:latest -f Containerfile . || exit 1 | 6 | docker build -t $IMAGE_NAME -f Containerfile . || exit 1 |
| 5 | if [ "$PUSH" = "1" ]; then | 7 | if [ "$PUSH" = "1" ]; then |
| 6 | docker push git.d464.sh/code/whoami:latest || exit 1 | 8 | docker push $IMAGE_NAME || exit 1 |
| 7 | fi | 9 | fi |
