From 7911882c2ed1b1428db3140018ec8738f9d81d9d Mon Sep 17 00:00:00 2001 From: Artem Kladov Date: Sun, 10 Dec 2023 21:21:26 +0300 Subject: [PATCH] ci: use enterprise runners Use secrets for K8s context. Signed-off-by: Artem Kladov --- .github/workflows/cleanup.yml | 6 ++++-- .github/workflows/content_validation.yml | 4 ++-- .github/workflows/deploy.yml | 12 ++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 2722dfa99..0e0ef4003 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -13,16 +13,18 @@ env: jobs: cleanup: name: Cleanup - runs-on: self-hosted + runs-on: ubuntu-latest-4-cores steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow - name: Cleanup uses: werf/actions/cleanup@v1.2 + with: + kube-config-base64-data: ${{ secrets.KUBECONFIG_BASE64_PROD }} env: WERF_LOG_VERBOSE: "on" WERF_REPO_GITHUB_TOKEN: ${{ secrets.REGISTRY_CLEANUP_TOKEN }} diff --git a/.github/workflows/content_validation.yml b/.github/workflows/content_validation.yml index ae4b3ba4a..6ba4d4e0c 100644 --- a/.github/workflows/content_validation.yml +++ b/.github/workflows/content_validation.yml @@ -22,7 +22,7 @@ jobs: uses: werf/actions/install@v1.2 - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Task uses: arduino/setup-task@v1 @@ -80,7 +80,7 @@ jobs: uses: werf/actions/install@v1.2 - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Task uses: arduino/setup-task@v1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 35a0e33f5..2e217854c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,11 +18,11 @@ jobs: converge: name: Deploy if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test website') || contains(github.event.pull_request.labels.*.name, 'stage website') - runs-on: self-hosted + runs-on: ubuntu-latest-4-cores steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -37,8 +37,8 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'test website') with: env: test + kube-config-base64-data: ${{ secrets.KUBECONFIG_BASE64_DEV }} env: - WERF_KUBE_CONTEXT: dev WERF_NAMESPACE: "werfio-test" WERF_RELEASE: "werfio-site-test" WERF_LOG_VERBOSE: "on" @@ -48,8 +48,8 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'stage website') with: env: stage + kube-config-base64-data: ${{ secrets.KUBECONFIG_BASE64_DEV }} env: - WERF_KUBE_CONTEXT: dev WERF_NAMESPACE: "werfio-stage" WERF_RELEASE: "werfio-site-stage" WERF_LOG_VERBOSE: "on" @@ -59,8 +59,8 @@ jobs: if: github.ref == 'refs/heads/main' with: env: production + kube-config-base64-data: ${{ secrets.KUBECONFIG_BASE64_PROD }} env: - WERF_KUBE_CONTEXT: prod WERF_NAMESPACE: "werfio-production" WERF_RELEASE: "werfio-site-production" WERF_LOG_VERBOSE: "on" @@ -69,7 +69,7 @@ jobs: name: Notification if: always() needs: converge - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-cores steps: - uses: technote-space/workflow-conclusion-action@v2