From f5d47034b3a66d0e83dbf178b1be94f50a57078e Mon Sep 17 00:00:00 2001 From: Joris Bertomeu Date: Tue, 1 Oct 2024 11:38:44 +0200 Subject: [PATCH] Refactor ci workflow --- .gitea/workflows/ci.yaml | 2 +- .woodpecker.yaml | 49 ---------------------------------------- 2 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 .woodpecker.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 5d9a2c8..320930e 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -57,4 +57,4 @@ jobs: docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} docker stop ${{ env.CONTAINER_NAME }} || true docker rm ${{ env.CONTAINER_NAME }} || true - docker run -d --name ${{ env.CONTAINER_NAME }} -p 6080:80 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \ No newline at end of file + docker run -d --name ${{ env.CONTAINER_NAME }} -p ${{ vars.CONTAINER_EXTERNAL_PORT }}:${{ vars.CONTAINER_INTERNAL_PORT }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \ No newline at end of file diff --git a/.woodpecker.yaml b/.woodpecker.yaml deleted file mode 100644 index 243c9b4..0000000 --- a/.woodpecker.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Build and publish Docker images for multiple architectures. -# -# Pushing an image to codeberg's container registry -# The package owner will be the repo owner. -# -# This config also shows usage of yaml aliases and -# was taken from https://codeberg.org/6543/docker-images/src/commit/37e29c227717c1c07d2776cddcf14725bf952875/.woodpecker/hello.yml - -when: - - event: [push, manual] - branch: main - -variables: - - &file Dockerfile - - ®istry http://192.168.1.230:5000 - - &repo 192.168.1.230:5000/bertomlab/crawlflix/front - -steps: - publish: - image: woodpeckerci/plugin-docker-buildx - settings: - dockerfile: *file - registry: *registry - repo: *repo - insecure: true - platforms: linux/amd64 - buildkit_config: | - [registry."192.168.1.230:5000"] - http = true - tags: - - latest - - ${CI_COMMIT_SHA} - username: - from_secret: docker_registry_username - password: - from_secret: docker_registry_password - deploy: - image: appleboy/drone-ssh - settings: - host: 192.168.1.222 - username: - from_secret: ssh_deploy_username - password: - from_secret: ssh_deploy_password - port: 22 - script: - - docker pull ${REPO}:${CI_COMMIT_SHA} - - docker rm -f crawlflix-front || true - - docker run -d --name crawlflix-front --restart always -p 2480:80 ${REPO}:${CI_COMMIT_SHA} \ No newline at end of file