From c5dce94721de78f7ffc8fae8b8bbff05b80cd9f0 Mon Sep 17 00:00:00 2001 From: "leon.hoppe" Date: Tue, 12 Sep 2023 17:15:24 +0200 Subject: [PATCH] migrated to gitlab CI/CD --- .gitea/workflows/build.yaml | 51 ------------------------------------- .gitlab-ci.yml | 18 +++++++++++++ 2 files changed, 18 insertions(+), 51 deletions(-) delete mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index cebbe97..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: build - -env: - DOCKER_IMAGE: git.leon-hoppe.de/leon.hoppe/betteriserv - -on: - push: - branches: main - -jobs: - build-frontend: - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Login to Repo - uses: docker/login-action@v2 - with: - registry: git.leon-hoppe.de - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build docker image - run: docker build -t ${{ env.DOCKER_IMAGE }}:frontend BetterIServ.Mobile/ - - - name: Push docker image - run: docker push ${{ env.DOCKER_IMAGE }}:frontend - - build-backend: - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Login to Repo - uses: docker/login-action@v2 - with: - registry: git.leon-hoppe.de - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build docker image - run: docker build -t ${{ env.DOCKER_IMAGE }}:backend BetterIServ.Backend/ - - - name: Push docker image - run: docker push ${{ env.DOCKER_IMAGE }}:backend diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..16def37 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +variables: + DOCKER_IMAGE: registry.gitlab.com/leon.hoppe/betteriserv + +build-frontend: + image: docker:latest + stage: build + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.gitlab.com + - docker build -t $DOCKER_IMAGE:frontend BetterIServ.Mobile/ + - docker push $DOCKER_IMAGE:frontend + +build-backend: + image: docker:latest + stage: build + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.gitlab.com + - docker build -t $DOCKER_IMAGE:backend BetterIServ.Backend/ + - docker push $DOCKER_IMAGE:backend