FIINAL: build
All checks were successful
Build docker container / Build image (push) Successful in 9m17s
All checks were successful
Build docker container / Build image (push) Successful in 9m17s
This commit is contained in:
43
.gitea/workflows/build.yml
Normal file
43
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: Build docker container
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build image
|
||||||
|
runs-on: ubuntu
|
||||||
|
|
||||||
|
services:
|
||||||
|
docker:
|
||||||
|
image: nexus3.rancherk3.duckdns.org/tfm/docker:23.0.6-dind
|
||||||
|
options: >-
|
||||||
|
--privileged
|
||||||
|
--cap-add SYS_ADMIN
|
||||||
|
--cap-add NET_ADMIN
|
||||||
|
--cap-add SETPCAP
|
||||||
|
--cap-add MKNOD
|
||||||
|
--cap-add NET_BIND_SERVICE
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: microserviciospython
|
||||||
|
REGISTRY: nexus3.rancherk3.duckdns.org
|
||||||
|
REPO_OWNER: tfm
|
||||||
|
DOCKER_HOST: tcp://docker:2375
|
||||||
|
DOCKER_TLS_VERIFY: ""
|
||||||
|
DOCKER_CERT_PATH: ""
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build and push
|
||||||
|
run: |
|
||||||
|
TODAY=$(date +'%Y-%m-%d')
|
||||||
|
|
||||||
|
rm -rf /root/.docker
|
||||||
|
|
||||||
|
docker version
|
||||||
|
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
||||||
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY}
|
||||||
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
||||||
Reference in New Issue
Block a user