From f795ec9ca2edc6e15e6623cb5047d5fbd72c98a1 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Fri, 27 Nov 2020 17:37:18 +0100 Subject: Rename kubernetes-deployment.yaml to deploy.yaml I've renamed the file to create a more consistent naming scheme. --- .github/workflows/deploy.yaml | 45 ++++++++++++++++++++++++++++ .github/workflows/kubernetes-deployment.yaml | 45 ---------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/deploy.yaml delete mode 100644 .github/workflows/kubernetes-deployment.yaml (limited to '.github/workflows') diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 00000000..ff2652fd --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,45 @@ +name: Deploy + +on: + workflow_run: + workflows: ["Build"] + branches: + - master + types: + - completed + +jobs: + deploy: + if: github.event.workflow_run.conclusion == 'success' + name: Deploy to Kubernetes Cluster + runs-on: ubuntu-latest + + steps: + - name: Create SHA Container Tag + id: sha_tag + run: | + tag=$(cut -c 1-7 <<< $GITHUB_SHA) + echo "::set-output name=tag::$tag" + + # Check out the private Kubernetes repository for the + # deployment.yaml file using a GitHub Personal Access + # Token to get access. + - name: Checkout code + uses: actions/checkout@v2 + with: + repository: python-discord/kubernetes + token: ${{ secrets.REPO_TOKEN }} + + - name: Authenticate with Kubernetes + uses: azure/k8s-set-context@v1 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + + - name: Deploy to Kubernetes + uses: Azure/k8s-deploy@v1 + with: + manifests: | + site/deployment.yaml + images: 'ghcr.io/python-discord/site:${{ steps.sha_tag.outputs.tag }}' + kubectl-version: 'latest' diff --git a/.github/workflows/kubernetes-deployment.yaml b/.github/workflows/kubernetes-deployment.yaml deleted file mode 100644 index ff2652fd..00000000 --- a/.github/workflows/kubernetes-deployment.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: Deploy - -on: - workflow_run: - workflows: ["Build"] - branches: - - master - types: - - completed - -jobs: - deploy: - if: github.event.workflow_run.conclusion == 'success' - name: Deploy to Kubernetes Cluster - runs-on: ubuntu-latest - - steps: - - name: Create SHA Container Tag - id: sha_tag - run: | - tag=$(cut -c 1-7 <<< $GITHUB_SHA) - echo "::set-output name=tag::$tag" - - # Check out the private Kubernetes repository for the - # deployment.yaml file using a GitHub Personal Access - # Token to get access. - - name: Checkout code - uses: actions/checkout@v2 - with: - repository: python-discord/kubernetes - token: ${{ secrets.REPO_TOKEN }} - - - name: Authenticate with Kubernetes - uses: azure/k8s-set-context@v1 - with: - method: kubeconfig - kubeconfig: ${{ secrets.KUBECONFIG }} - - - name: Deploy to Kubernetes - uses: Azure/k8s-deploy@v1 - with: - manifests: | - site/deployment.yaml - images: 'ghcr.io/python-discord/site:${{ steps.sha_tag.outputs.tag }}' - kubectl-version: 'latest' -- cgit v1.2.3