This commit is contained in:
48
.gitea/workflows/build_web.yml_disable
Normal file
48
.gitea/workflows/build_web.yml_disable
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Build docker container
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build image
|
||||
runs-on: ubuntu
|
||||
|
||||
services:
|
||||
docker:
|
||||
image: docker:23.0.6-dind
|
||||
env:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
cmd:
|
||||
- dockerd
|
||||
options: >-
|
||||
--privileged
|
||||
ports:
|
||||
- "2376:2375"
|
||||
|
||||
env:
|
||||
IMAGE_NAME: microserviciospython
|
||||
REGISTRY: nexus.rancherk3.duckdns.org
|
||||
REPO_OWNER: tfm
|
||||
DOCKER_HOST: tcp://localhost:2376
|
||||
DOCKER_TLS_VERIFY: ""
|
||||
DOCKER_CERT_PATH: ""
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and push
|
||||
run: |
|
||||
|
||||
TODAY=$(date +'%Y-%m-%d')
|
||||
echo $TODAY
|
||||
|
||||
rm -rf /root/.docker
|
||||
|
||||
sleep 10
|
||||
|
||||
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