Remove GitLab CI configuration and update Gitea workflow to use 'master' branch and specify Dockerfile path.
Some checks failed
Build and push image / docker-build (push) Failing after 12s
Some checks failed
Build and push image / docker-build (push) Failing after 12s
This commit is contained in:
@@ -3,7 +3,7 @@ name: Build and push image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-build:
|
docker-build:
|
||||||
@@ -14,6 +14,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
env:
|
env:
|
||||||
@@ -27,6 +29,7 @@ jobs:
|
|||||||
IMAGE_TAG: ${{ gitea.sha }}
|
IMAGE_TAG: ${{ gitea.sha }}
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
|
-f docker/Dockerfile_app \
|
||||||
-t "${IMAGE_NAME}:${IMAGE_TAG}" \
|
-t "${IMAGE_NAME}:${IMAGE_TAG}" \
|
||||||
-t "${IMAGE_NAME}:latest" \
|
-t "${IMAGE_NAME}:latest" \
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
docker-build:
|
|
||||||
image: docker:latest
|
|
||||||
stage: build
|
|
||||||
variables:
|
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
before_script:
|
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
|
||||||
script:
|
|
||||||
- touch .env
|
|
||||||
- |
|
|
||||||
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then # master
|
|
||||||
export BUILD_TAG=latest
|
|
||||||
echo "Running on default branch '$CI_DEFAULT_BRANCH'"
|
|
||||||
else # tag
|
|
||||||
export BUILD_TAG="$CI_COMMIT_TAG"
|
|
||||||
echo "Running on tag = $BUILD_TAG"
|
|
||||||
fi
|
|
||||||
- docker compose build
|
|
||||||
- docker compose push
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- tags
|
|
||||||
Reference in New Issue
Block a user