From 9c9d78cb1204215daa06cd775c13ec9f53b40e5f Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Thu, 18 Jul 2024 14:43:47 +0700 Subject: [PATCH] Remove circleCI and update the on push condition --- .circleci/config.yml | 103 ---------------------------------- .github/workflows/publish.yml | 5 +- 2 files changed, 3 insertions(+), 105 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1405847..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,103 +0,0 @@ -version: 2.1 - -orbs: - go: circleci/go@1.7.3 - aws-ecr: circleci/aws-ecr@8.2.1 - -jobs: - build_lint_test: - machine: - image: ubuntu-2204:2024.01.1 - resource_class: large - steps: - - go/install: - version: "1.22.3" - - checkout - - run: - name: Print Go environment - command: "go env" - - go/load-cache: - key: go-mod-v6-{{ checksum "go.sum" }} - - go/mod-download - - go/save-cache: - key: go-mod-v6-{{ checksum "go.sum" }} - path: "/home/circleci/.go_workspace/pkg/mod" - - run: - name: Build cli app - command: make build - - run: - name: Lint - command: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 - ./bin/golangci-lint run --timeout 5m0s - - run: - name: Run tests - command: | - make test - - run: - name: Run integration tests - command: | - make test-e2e - - build_docker: - machine: - image: ubuntu-2204:2024.01.1 - resource_class: large - steps: - - checkout - - aws-ecr/build-image: - push-image: false - dockerfile: Dockerfile - path: ./ - build-path: ./ - tag: "$CIRCLE_SHA1,$CIRCLE_TAG" - repo: "covenant-signer" - - run: - name: Save Docker image to export it to workspace - command: | - docker save $(docker image ls --format '{{.Repository}}:{{.Tag}}') > /tmp/covenant-signer.tar - - persist_to_workspace: - root: /tmp - paths: - - covenant-signer.tar - - push_docker: - machine: - image: ubuntu-2204:2024.01.1 - resource_class: large - steps: - - attach_workspace: - at: /tmp - - run: - name: Load Docker image from workspace - command: | - docker load -i /tmp/covenant-signer.tar - - aws-ecr/ecr-login: - aws-access-key-id: AWS_ACCESS_KEY_ID - aws-secret-access-key: AWS_SECRET_ACCESS_KEY - region: "$AWS_REGION" - - aws-ecr/push-image: - registry-id: AWS_ECR_REGISTRY_ID - region: "$AWS_REGION" - repo: "covenant-signer" - tag: "$CIRCLE_SHA1,$CIRCLE_TAG" - -workflows: - CI: - jobs: - - build_lint_test - - build_docker: - filters: - tags: - only: /.*/ - - push_docker: - requires: - - build_docker - filters: - tags: - only: /.*/ - branches: - only: - - main - - dev - - logging-middleware diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 63de16d..e0fd96c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,9 +3,10 @@ name: docker_publish on: push: branches: - - 'hiep/add-github-actions' + - 'main' + - 'dev' tags: - - 'hiep/add-github-actions' + - '*' jobs: lint_test: