From e863de591d530bdb3ff86199cb0220424af3c10a Mon Sep 17 00:00:00 2001 From: Chen Yu Date: Thu, 14 Sep 2023 14:54:20 +0900 Subject: [PATCH] ci: remove actions of deployments (#100) The deployment has been migrated to vercel --- .github/workflows/_build_deploy.yml | 63 ----------------------------- .github/workflows/mainnet.yml | 15 ------- .github/workflows/testnet.yml | 15 ------- 3 files changed, 93 deletions(-) delete mode 100644 .github/workflows/_build_deploy.yml delete mode 100644 .github/workflows/mainnet.yml delete mode 100644 .github/workflows/testnet.yml diff --git a/.github/workflows/_build_deploy.yml b/.github/workflows/_build_deploy.yml deleted file mode 100644 index d0f5588a6..000000000 --- a/.github/workflows/_build_deploy.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Pull, build, push and deploy -on: - workflow_call: - inputs: - ckb-mode: - required: true - type: string - k8s-namespace: - required: true - type: string - k8s-workload: - required: true - type: string - environment: - required: false - type: string - default: staging - secrets: - GHCR_USERNAME: - required: true - GHCR_TOKEN: - required: true - KUBOARD_USERNAME: - required: true - KUBOARD_ACCESS_KEY: - required: true - KUBOARD_API_URL: - required: true -jobs: - deploy: - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Build and push - id: docker_build - uses: mr-smithers-excellent/docker-build-push@v5 - with: - image: ckb-explorer-frontend - registry: ghcr.io - githubOrg: magickbase # optional - buildArgs: "API_URL=${{ secrets.API_URL }},CHAIN_TYPE=${{ inputs.ckb-mode }}" - enableBuildKit: true - username: ${{ secrets.GHCR_USERNAME }} - password: ${{ secrets.GHCR_TOKEN }} - - name: Update image on K8S - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ secrets.KUBOARD_API_URL }}/cluster/ckb/kind/CICDApi/ops/resource/updateImageTag - method: 'PUT' - customHeaders: '{"Content-Type": "application/json", "Cookie": "KuboardUsername=${{ secrets.KUBOARD_USERNAME }}; KuboardAccessKey=${{ secrets.KUBOARD_ACCESS_KEY }}"}' - data: '{"kind":"deployments","namespace":"${{ inputs.k8s-namespace }}","name":"${{ inputs.k8s-workload }}","images":{"ckb-explorer-frontend":"${{ steps.docker_build.outputs.imageFullName }}:${{ steps.docker_build.outputs.tags }}"}}' - - name: Restart container - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ secrets.KUBOARD_API_URL }}/cluster/ckb/kind/CICDApi/ops/resource/restartWorkload - method: 'PUT' - customHeaders: '{"Content-Type": "application/json", "Cookie": "KuboardUsername=${{ secrets.KUBOARD_USERNAME }}; KuboardAccessKey=${{ secrets.KUBOARD_ACCESS_KEY }}"}' - data: '{"kind":"deployments","namespace":"${{ inputs.k8s-namespace }}","name":"${{ inputs.k8s-workload }}"}' - - diff --git a/.github/workflows/mainnet.yml b/.github/workflows/mainnet.yml deleted file mode 100644 index 42c9dee55..000000000 --- a/.github/workflows/mainnet.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Deploy to mainnet - -on: - push: - branches: - - master -jobs: - deploy: - uses: ./.github/workflows/_build_deploy.yml - with: - ckb-mode: mainnet - k8s-namespace: mainnet - k8s-workload: ckb-explorer-front - environment: mainnet - secrets: inherit diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml deleted file mode 100644 index cf20ae316..000000000 --- a/.github/workflows/testnet.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Deploy to testnet - -on: - push: - branches: - - testnet -jobs: - deploy: - uses: ./.github/workflows/_build_deploy.yml - with: - ckb-mode: testnet - k8s-namespace: testnet - k8s-workload: ckb-explorer-front - environment: testnet - secrets: inherit