From aeaa47983dca50792adb68e64b895f412a6c0b79 Mon Sep 17 00:00:00 2001 From: Spedoske Date: Mon, 7 Aug 2023 00:49:49 -0400 Subject: [PATCH] migrate to github actions --- .github/workflows/docker-image.yml | 22 ++++++++++++++++++++++ .gitlab-ci.yml | 11 ----------- 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/docker-image.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..1e0e5ea --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,22 @@ +name: Docker Image CI +on: + push: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-22.04 + env: + tag: ${{ secrets.CI_REGISTRY }}/geekpie/passwordle-frontend:latest + steps: + - uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: ${{ secrets.CI_REGISTRY }} + username: ${{ secrets.CI_REGISTRY_USER }} + password: ${{ secrets.CI_REGISTRY_PASSWORD }} + - name: Build the Docker image + run: docker build . --file Dockerfile --tag $tag + - name: Push the Docker image + run: docker push $tag diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f891836..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,11 +0,0 @@ -stages: - - build -build-server: - stage: build - image: gcr.io/kaniko-project/executor:debug - variables: - CI_REGISTRY_USER_WITHDOLLAR: $CI_REGISTRY_USER - script: - - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER_WITHDOLLAR\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --context . --dockerfile ./Dockerfile --destination $CI_REGISTRY/$CI_PROJECT/passwordle-frontend:$CI_COMMIT_BRANCH