Changed CI Workflow
This commit is contained in:
parent
eb10124fb8
commit
c02f91f237
1 changed files with 10 additions and 17 deletions
|
@ -31,8 +31,8 @@ gosec:
|
||||||
- go get -v -d .
|
- go get -v -d .
|
||||||
- gosec ./...
|
- gosec ./...
|
||||||
|
|
||||||
docker-build-prod:
|
docker-build-prod-latest:
|
||||||
image: docker:latest
|
image: carlallen/docker:buildx
|
||||||
stage: build
|
stage: build
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
@ -40,20 +40,13 @@ docker-build-prod:
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
|
docker buildx build \
|
||||||
tag=""
|
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \
|
||||||
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
|
--push \
|
||||||
else
|
--tag $CI_REGISTRY_IMAGE:latest \
|
||||||
tag=":$CI_COMMIT_REF_SLUG"
|
.
|
||||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
only:
|
||||||
fi
|
- main
|
||||||
- docker buildx create --use
|
|
||||||
- docker buildx build
|
|
||||||
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
|
|
||||||
--tag $CI_REGISTRY_IMAGE${tag}
|
|
||||||
--push
|
|
||||||
except:
|
|
||||||
- merge_requests
|
|
||||||
|
|
||||||
docker-build-MR-dry-run:
|
docker-build-MR-dry-run:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
|
|
Loading…
Reference in a new issue