diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 708d209..6825a4d 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -2,9 +2,9 @@ name: Build latest from main and deploy to staging on: workflow_run: - workflows: [ 'Run Tests'] - branches: [ 'main' ] - types: [ completed ] + workflows: ['Run Tests'] + branches: ['main'] + types: [completed] jobs: build: @@ -22,17 +22,6 @@ jobs: push_latest: true registry_token: ${{ github.token }} - deploy-staging: - needs: build - runs-on: ubuntu-latest - environment: staging - steps: - - name: Deploy to staging - uses: mlibrary/deploy-to-kubernetes@v3 - with: - registry_token: ${{ github.token }} - image: ghcr.io/${{ github.repository }}-unstable:${{ github.sha }} - cluster_ca: ${{ secrets.KUBERNETES_CA }} - cluster_server: ${{ secrets.KUBERNETES_SERVER }} - namespace_token: ${{ secrets.KUBERNETES_TOKEN }} - namespace: ${{ secrets.KUBERNETES_NAMESPACE }} +# TODO: automate deployment w/ argocd +# for now - update image in +# https://github.com/hathitrust/ht_tanka/blob/main/environments/search_client/staging/main.jsonnet diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml deleted file mode 100644 index 8f474b4..0000000 --- a/.github/workflows/deploy-production.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Deploy to Production - -on: - workflow_dispatch: - inputs: - tag: - description: Release - required: true - -jobs: - deploy: - runs-on: ubuntu-latest - environment: production - steps: - - name: Deploy to production - uses: mlibrary/deploy-to-kubernetes@v3 - with: - registry_token: ${{ github.token }} - image: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }} - cluster_ca: ${{ secrets.KUBERNETES_CA }} - cluster_server: ${{ secrets.KUBERNETES_SERVER }} - namespace_token: ${{ secrets.KUBERNETES_TOKEN }} - namespace: ${{ secrets.KUBERNETES_NAMESPACE }} diff --git a/.github/workflows/manual-deploy-testing.yml b/.github/workflows/manual-deploy-testing.yml deleted file mode 100644 index ff330af..0000000 --- a/.github/workflows/manual-deploy-testing.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Manual Deploy to Testing - -on: - workflow_dispatch: - inputs: - tag: - description: tag - required: true - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - uses: hathitrust/github_actions/build@v1 - with: - dockerfile: Dockerfile.prod - image: ghcr.io/${{ github.repository }}-unstable - tag: ${{ github.event.inputs.tag }} - push_latest: false - registry_token: ${{ github.token }} - - deploy: - needs: build - runs-on: ubuntu-latest - environment: testing - steps: - - uses: actions/checkout@v3 - - name: Find commit for tag - id: tag_check - uses: hathitrust/github_actions/validate-tag@v1 - with: - tag: ${{ github.event.inputs.tag }} - - name: Deploy to testing - uses: mlibrary/deploy-to-kubernetes@v3 - with: - registry_token: ${{ github.token }} - image: ghcr.io/${{ github.repository }}-unstable:${{ steps.tag_check.outputs.tag }} - cluster_ca: ${{ secrets.KUBERNETES_CA }} - cluster_server: ${{ secrets.KUBERNETES_SERVER }} - namespace_token: ${{ secrets.KUBERNETES_TOKEN }} - namespace: ${{ secrets.KUBERNETES_NAMESPACE }}