fix(ci): pin docker api version for release builds refs NOISSUE
This commit is contained in:
@@ -4,6 +4,7 @@ permissions:
|
||||
|
||||
env:
|
||||
SKIP_MAKE_SETUP_CHECK: 'true'
|
||||
DOCKER_API_VERSION: '1.43'
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -49,11 +50,15 @@ jobs:
|
||||
fi
|
||||
- name: Login to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
env:
|
||||
DOCKER_API_VERSION: ${{ env.DOCKER_API_VERSION }}
|
||||
with:
|
||||
username: gitearobot
|
||||
password: ${{ secrets.PACKAGE_GITEA_PAT }}
|
||||
registry: git.disi.dev
|
||||
- name: Build and publish
|
||||
env:
|
||||
DOCKER_API_VERSION: ${{ env.DOCKER_API_VERSION }}
|
||||
run: |
|
||||
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')
|
||||
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
|
||||
|
||||
@@ -40,4 +40,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8000/health || exit 1
|
||||
|
||||
# Run application
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]"]
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
|
||||
4
Makefile
4
Makefile
@@ -1,5 +1,7 @@
|
||||
.ONESHELL:
|
||||
|
||||
DOCKER_API_VERSION ?= 1.43
|
||||
|
||||
.PHONY: issetup
|
||||
issetup:
|
||||
@[ -f .git/hooks/commit-msg ] || [ -z ${SKIP_MAKE_SETUP_CHECK+x} ] || (echo "You must run 'make setup' first to initialize the repo!" && exit 1)
|
||||
@@ -42,7 +44,7 @@ release: issetup ## Create a new tag for release.
|
||||
|
||||
.PHONY: build
|
||||
build: issetup ## Create a new tag for release.
|
||||
@docker build -t ai-software-factory:$(cat ai-software-factory/VERSION) -f Containerfile .
|
||||
@DOCKER_API_VERSION=$(DOCKER_API_VERSION) docker build -t ai-software-factory:$(cat ai_software_factory/VERSION) -f Containerfile .
|
||||
|
||||
# This project has been generated from rochacbruno/python-project-template
|
||||
#igest__ = 'rochacbruno'
|
||||
|
||||
Reference in New Issue
Block a user