From 81ff35388b38e51ba087c0f9619b005a1ccd3e49 Mon Sep 17 00:00:00 2001 From: lilleman Date: Sat, 16 Dec 2023 22:59:51 +0100 Subject: [PATCH] Testing pipelines --- .drone.yml | 78 --------------------------------------- .gitea/workflows/test.yml | 19 ++++++++++ 2 files changed, 19 insertions(+), 78 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/test.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index ce9c594..0000000 --- a/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -kind: pipeline -type: docker -name: Tests - -steps: - - name: Tests - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker-compose down -v --remove-orphans -t0 - - docker-compose build - - docker-compose --profile tests build - - docker-compose up -d - - docker-compose run --rm tests - - docker-compose down -v --remove-orphans -t0 - -volumes: - - name: docker-sock - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - tag ---- -kind: pipeline -type: docker -name: Deploy - -steps: - - name: Tests - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker-compose down -v --remove-orphans -t0 - - docker-compose build - - docker-compose --profile tests build - - docker-compose up -d - - docker-compose run --rm tests - - docker-compose down -v --remove-orphans -t0 - - name: Build images - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker build -t lilleman/auth-api-db-migrate:$DRONE_TAG -f ./Dockerfile.migrations . - - docker build -t lilleman/auth-api:$DRONE_TAG -f ./Dockerfile . - - name: Push to Docker Hub - image: docker/compose:1.29.2 - environment: - DOCKERHUB_TOKEN: - from_secret: dockerhub - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker login -u lilleman -p $DOCKERHUB_TOKEN - - docker push lilleman/auth-api-db-migrate:$DRONE_TAG - - docker push lilleman/auth-api:$DRONE_TAG - - docker tag lilleman/auth-api-db-migrate:$DRONE_TAG lilleman/auth-api-db-migrate:latest - - docker tag lilleman/auth-api:$DRONE_TAG lilleman/auth-api:latest - - docker push lilleman/auth-api-db-migrate:latest - - docker push lilleman/auth-api:latest - -volumes: - - name: docker-sock - host: - path: /var/run/docker.sock - -trigger: - event: - - tag diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..d67ac59 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,19 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file