From 5073022ee03611effb48662dfef82b2f2fbaca44 Mon Sep 17 00:00:00 2001 From: trueold89 Date: Tue, 5 Nov 2024 23:30:09 +0300 Subject: [PATCH] Update cicd --- .gitea/workflows/pipeline.yml | 16 ---------------- .gitea/workflows/update.yml | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 .gitea/workflows/pipeline.yml create mode 100644 .gitea/workflows/update.yml diff --git a/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml deleted file mode 100644 index 5b050ae..0000000 --- a/.gitea/workflows/pipeline.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Обновление сайта базы знаний - -on: - push: - branches: - - main - -jobs: - site_update: - runs-on: self-hosted - steps: - - name: Обновляю сайт - run: | - docker container restart "$CONTAINER_ID" - env: - TOKEN: ${{ secrets.CONTAINER_ID }} diff --git a/.gitea/workflows/update.yml b/.gitea/workflows/update.yml new file mode 100644 index 0000000..3834d9e --- /dev/null +++ b/.gitea/workflows/update.yml @@ -0,0 +1,23 @@ +pipelines: + default: + - name: Обновляю сайт + image: docker:latest + services: + - docker + commands: + - docker restart "$CONATAINER_ID" + env: + TOKEN: ${{ secrets.CONTAINER_ID }} + +actions: + push: + branches: + - main + pipelines: + - default + +services: + docker: + image: docker:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock