diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 000000000..b77045aeb --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,5 @@ +version = 1 + + +[[analyzers]] +name = "secrets" \ No newline at end of file diff --git a/.github/workflows/build_and_push.yaml b/.github/workflows/build_and_push.yaml deleted file mode 100644 index eef5ca7dc..000000000 --- a/.github/workflows/build_and_push.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build and push docker image -on: - push: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build_and_push_image: - name: "${{ github.head_ref }}" - runs-on: [self-hosted, charizard] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Authenticate to Google Cloud - uses: 'google-github-actions/auth@v1' - with: - credentials_json: '${{ secrets.DS_GHA_SA_DEV }}' - - - name: Set up Cloud SDK - uses: 'google-github-actions/setup-gcloud@v1' - - - name: Configure docker for gcr - run: gcloud auth configure-docker - - - name: Build dev image - uses: docker/build-push-action@v4 - with: - context: . - tags: us.gcr.io/deepsource-dev/swift-format-static:dev - push: true - pull: true - no-cache: true diff --git a/cloudbuild_depl.yaml b/cloudbuild_depl.yaml new file mode 100644 index 000000000..b72f8011f --- /dev/null +++ b/cloudbuild_depl.yaml @@ -0,0 +1,17 @@ +# Build +timeout: 20m0s + +steps: + - name: "gcr.io/cloud-builders/docker:20.10.14" + args: + - build + - -t + - us.gcr.io/deepsource-production/swift-format:$TAG_NAME + - -t + - us.gcr.io/deepsource-production/swift-format:latest + - . + +images: ['us.gcr.io/deepsource-production/swift-format:$TAG_NAME', 'us.gcr.io/deepsource-production/swift-format:latest'] + +options: + machineType: 'E2_HIGHCPU_8' diff --git a/cloudbuild_depl_dev.yaml b/cloudbuild_depl_dev.yaml new file mode 100644 index 000000000..4d9704cfb --- /dev/null +++ b/cloudbuild_depl_dev.yaml @@ -0,0 +1,13 @@ +# Build +timeout: 40m0s +steps: + - name: "gcr.io/cloud-builders/docker" + args: + - build + - --tag=us.gcr.io/deepsource-dev/swift-format:dev + - . + +images: ['us.gcr.io/deepsource-dev/swift-format:dev'] + +options: + machineType: 'E2_HIGHCPU_8'