From d1dd661b9a1d3b26e56f78e2c7a6fc0eac9ecf54 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Sun, 30 Mar 2025 17:03:27 +0300 Subject: [PATCH] replace drone ci with actions --- .drone.yml | 36 ------------------------------------ .gitea/workflows/deploy.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 36 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/deploy.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 0dc9271..0000000 --- a/.drone.yml +++ /dev/null @@ -1,36 +0,0 @@ -kind: pipeline -name: default - -steps: - - name: docker - image: plugins/docker - settings: - registry: - from_secret: CI_REGISTRY - username: - from_secret: CI_REGISTRY_USER - password: - from_secret: CI_REGISTRY_PASSWORD - repo: - from_secret: CI_APP_IMAGE - tags: - - latest - - name: deploy - image: alpine:latest - environment: - DEPLOYER_AUTH: - from_secret: DEPLOYER_AUTH - DEPLOYER_URL: - from_secret: DEPLOYER_URL - commands: - - apk add --no-cache curl - - curl -H "$DEPLOYER_AUTH" $DEPLOYER_URL - when: - branch: - - master - -trigger: - event: - - push - branch: - - master diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..9aefa3f --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: default + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: docker + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: git.neur0tx.site + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + push: true + tags: git.neur0tx.site/${{ github.repository_owner }}/${{ github.repository_name }}:latest + + - name: Deploy + if: ${{ success() }} + run: | + apk add --no-cache curl + curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }} + container: alpine:latest \ No newline at end of file