[DO-1171] fixed gitea actions (#4)

Reviewed-on: https://git.avroid.tech/Docker/tavro-build-linux/pulls/4
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
aleksandr.vodyanov
2024-10-08 13:00:43 +03:00
committed by Aleksandr Vodyanov
parent 0f23f14d6a
commit 52abc92414
2 changed files with 11 additions and 10 deletions

View File

@@ -27,14 +27,14 @@ jobs:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: "Build image and push" - name: "Build image"
run: | run: |
make build make build
- name: "Push image" - name: "Push image"
run: | run: |
make push make push
if: gitea.branch_name == 'master' if: ${{ gitea.ref == 'refs/heads/master' }}
- name: "Clear image" - name: "Clear image"
run: | run: |
@@ -46,4 +46,4 @@ jobs:
git config user.email "svc-jenkins@avroid.tech" git config user.email "svc-jenkins@avroid.tech"
git tag $(make getTag) git tag $(make getTag)
git push origin $(make getTag) git push origin $(make getTag)
if: gitea.branch_name == 'master' if: ${{ gitea.ref == 'refs/heads/master' }}

View File

@@ -5,6 +5,11 @@ IMAGE_GROUP = tavro
IMAGE_TAG = 1.3 IMAGE_TAG = 1.3
REVISION = REVISION =
DOCKER_REGISTRY = harbor.avroid.tech DOCKER_REGISTRY = harbor.avroid.tech
CI_FLAGS =
ifeq ($(CI), true)
CI_FLAGS = --no-cache
endif
all: all:
@echo 'DEFAULT:' @echo 'DEFAULT:'
@@ -13,17 +18,13 @@ all:
@echo ' make getTag' @echo ' make getTag'
@echo ' make clean' @echo ' make clean'
build: build:
ifeq ($(CI), false) DOCKER_BUILDKIT=1 docker build $(CI_FLAGS) \
CI_FLAGS='--no-cache'
endif
DOCKER_BUILDKIT=1 $(CI_FLAGS) \
docker build \
-f Dockerfile \ -f Dockerfile \
--platform linux/amd64 \ --platform linux/amd64 \
--network "host" \ --network host \
-t $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) src/ -t $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) src/
push: push: