[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:
committed by
Aleksandr Vodyanov
parent
0f23f14d6a
commit
52abc92414
@@ -27,14 +27,14 @@ jobs:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Build image and push"
|
||||
- name: "Build image"
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: "Push image"
|
||||
run: |
|
||||
make push
|
||||
if: gitea.branch_name == 'master'
|
||||
if: ${{ gitea.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: "Clear image"
|
||||
run: |
|
||||
@@ -46,4 +46,4 @@ jobs:
|
||||
git config user.email "svc-jenkins@avroid.tech"
|
||||
git tag $(make getTag)
|
||||
git push origin $(make getTag)
|
||||
if: gitea.branch_name == 'master'
|
||||
if: ${{ gitea.ref == 'refs/heads/master' }}
|
||||
|
||||
15
Makefile
15
Makefile
@@ -5,6 +5,11 @@ IMAGE_GROUP = tavro
|
||||
IMAGE_TAG = 1.3
|
||||
REVISION =
|
||||
DOCKER_REGISTRY = harbor.avroid.tech
|
||||
CI_FLAGS =
|
||||
|
||||
ifeq ($(CI), true)
|
||||
CI_FLAGS = --no-cache
|
||||
endif
|
||||
|
||||
all:
|
||||
@echo 'DEFAULT:'
|
||||
@@ -13,17 +18,13 @@ all:
|
||||
@echo ' make getTag'
|
||||
@echo ' make clean'
|
||||
|
||||
|
||||
build:
|
||||
|
||||
ifeq ($(CI), false)
|
||||
CI_FLAGS='--no-cache'
|
||||
endif
|
||||
|
||||
DOCKER_BUILDKIT=1 $(CI_FLAGS) \
|
||||
docker build \
|
||||
DOCKER_BUILDKIT=1 docker build $(CI_FLAGS) \
|
||||
-f Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--network "host" \
|
||||
--network host \
|
||||
-t $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) src/
|
||||
|
||||
push:
|
||||
|
||||
Reference in New Issue
Block a user