From 58d210bfeecba531d615da891be0b374fe68b193 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:20:26 +0100 Subject: [PATCH 01/13] chore: deploy on production only on tag --- .github/workflows/cd.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 44f63d80b..3b55ab600 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,9 +2,9 @@ name: CD on: push: - branches: - - main - # Deploy if "deploy" label exists + tags: + - '*' + # Deploy PR if "deploy" label exists pull_request: types: [ reopened, synchronize, labeled ] @@ -59,9 +59,9 @@ jobs: compose.yaml compose.prod.yaml set: | - *.cache-from=type=gha,scope=${{github.ref}} + *.cache-from=type=gha,scope=${{ github.ref }} *.cache-from=type=gha,scope=refs/heads/main - *.cache-to=type=gha,scope=${{github.ref}},mode=max + *.cache-to=type=gha,scope=${{ github.ref }},mode=max - name: Docker push run: | @@ -70,11 +70,17 @@ jobs: docker push $KEYCLOAK_DOCKER_IMAGE - name: Docker tag and push latest - if: github.event_name == 'push' + if: github.event_name != 'pull_request' run: | + docker tag $PHP_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/php:${{ github.ref_name }} + docker tag $PWA_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/pwa:${{ github.ref_name }} + docker tag $KEYCLOAK_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/keycloak:${{ github.ref_name }} docker tag $PHP_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/php:latest docker tag $PWA_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/pwa:latest docker tag $KEYCLOAK_DOCKER_IMAGE europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/keycloak:latest + docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/php:${{ github.ref_name }} + docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/pwa:${{ github.ref_name }} + docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/keycloak:${{ github.ref_name }} docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/php:latest docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/pwa:latest docker push europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/keycloak:latest From 1d5da7a1fcebf87a71fe092039ac568e166058e4 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:24:54 +0100 Subject: [PATCH 02/13] chore: application version should follow minor api-platform/core versions --- api/config/packages/api_platform.yaml | 2 +- helm/api-platform/Chart.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/config/packages/api_platform.yaml b/api/config/packages/api_platform.yaml index 82d4346ec..6c26bf351 100644 --- a/api/config/packages/api_platform.yaml +++ b/api/config/packages/api_platform.yaml @@ -1,6 +1,6 @@ api_platform: title: API Platform's demo - version: 1.0.0 + version: 3.2.0 description: | This is a demo application of the [API Platform](https://api-platform.com) framework. [Its source code](https://github.com/api-platform/demo) includes various examples, check it out! diff --git a/helm/api-platform/Chart.yaml b/helm/api-platform/Chart.yaml index 597cb5638..10aa538dd 100644 --- a/helm/api-platform/Chart.yaml +++ b/helm/api-platform/Chart.yaml @@ -17,12 +17,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 3.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.1.0 +appVersion: 3.2.0 dependencies: - name: postgresql From ac479264c67dbc9ff03746d8386d699bc36b8f46 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:34:01 +0100 Subject: [PATCH 03/13] chore: add helm dependencies in GitHub cache --- .github/workflows/deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 92e6909ee..22ed469c4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -73,9 +73,17 @@ jobs: gcloud components install gke-gcloud-auth-plugin gcloud --quiet auth configure-docker gcloud container clusters get-credentials ${{ inputs.gke-cluster }} --zone ${{ inputs.gke-zone }} + - + name: Cache Helm Dependencies + uses: actions/cache@v3 + with: + path: helm/api-platform/charts/ + key: ${{ runner.os }}-helm-dependencies-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-helm-dependencies- # https://github.com/helm/helm/issues/8036 - - name: Build helm dependencies + name: Build Helm Dependencies run: | helm repo add bitnami https://charts.bitnami.com/bitnami/ helm repo add stable https://charts.helm.sh/stable/ From 9468803ccacf4286ec65a26913be8d83c82acdb5 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:39:09 +0100 Subject: [PATCH 04/13] fix: security GitHub Action --- .github/workflows/security.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 1eb2bd622..c76cea205 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -38,9 +38,18 @@ jobs: python-version: 3.9.15 - name: Auth gcloud + id: auth uses: google-github-actions/auth@v2 with: + token_format: access_token credentials_json: ${{ secrets.GKE_SA_KEY }} + - + name: Login to GAR + uses: docker/login-action@v3 + with: + registry: europe-west1-docker.pkg.dev + username: oauth2accesstoken + password: ${{ steps.auth.outputs.access_token }} - name: Setup gcloud uses: google-github-actions/setup-gcloud@v1 @@ -49,8 +58,9 @@ jobs: - name: Configure gcloud run: | + gcloud components install gke-gcloud-auth-plugin gcloud --quiet auth configure-docker - gcloud container clusters get-credentials api-platform-demo --zone europe-west1-c + gcloud container clusters get-credentials ${{ env.GKE_CLUSTER }} --zone ${{ env.GCE_ZONE }} - name: Pull Docker Image run: docker pull europe-west1-docker.pkg.dev/${{ secrets.GKE_PROJECT }}/${{ secrets.GKE_PROJECT }}/${{ matrix.image }}:latest From 198050e8a84e6a6322e731b5042f0ecb689a9e5a Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:41:26 +0100 Subject: [PATCH 05/13] chore: remove setup-python from GitHub Actions --- .github/workflows/cd.yml | 5 ----- .github/workflows/cleanup.yml | 5 ----- .github/workflows/deploy.yml | 5 ----- .github/workflows/security.yml | 5 ----- 4 files changed, 20 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3b55ab600..7566dcbdc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -28,11 +28,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - # gcloud does not work with Python 3.10 because "collections.Mappings" was removed in Python 3.10. - - - uses: actions/setup-python@v4 - with: - python-version: 3.9.15 - name: Auth gcloud id: auth diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 944459353..8ab93c945 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -17,11 +17,6 @@ jobs: contents: 'read' id-token: 'write' steps: - # gcloud does not work with Python 3.10 because "collections.Mappings" was removed in Python 3.10. - - - uses: actions/setup-python@v4 - with: - python-version: 3.9.15 - name: Auth gcloud uses: google-github-actions/auth@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22ed469c4..d92f13302 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -52,11 +52,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # gcloud does not work with Python 3.10 because "collections.Mappings" was removed in Python 3.10. - - - uses: actions/setup-python@v4 - with: - python-version: 3.9.15 - name: Auth gcloud uses: google-github-actions/auth@v2 diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index c76cea205..b32c4f681 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -31,11 +31,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # gcloud does not work with Python 3.10 because "collections.Mappings" was removed in Python 3.10. - - - uses: actions/setup-python@v4 - with: - python-version: 3.9.15 - name: Auth gcloud id: auth From 846d3ce8090e86e3bdc06169782011c23de4ffdc Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:51:35 +0100 Subject: [PATCH 06/13] chore: add pnpm cache on e2e job --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d024b9a26..8a1c73434 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,14 @@ jobs: uses: pnpm/action-setup@v2 with: version: 8.6.2 + - + name: Cache PNPM + uses: actions/cache@v3 + with: + path: ${{ env.PNPM_HOME }} + key: ${{ runner.os }}-pnpm-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-pnpm- - name: Install Dependencies working-directory: pwa From 6ceda18a246a27d37be146778cc92ac4cd4b4618 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:06:02 +0100 Subject: [PATCH 07/13] chore: lint php files --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a1c73434..c08fb7988 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,9 +35,9 @@ jobs: compose.yaml compose.override.yaml set: | - *.cache-from=type=gha,scope=${{github.ref}} + *.cache-from=type=gha,scope=${{ github.ref }} *.cache-from=type=gha,scope=refs/heads/main - *.cache-to=type=gha,scope=${{github.ref}},mode=max + *.cache-to=type=gha,scope=${{ github.ref }},mode=max - name: Start services run: docker compose up --wait --no-build @@ -113,10 +113,10 @@ jobs: compose.yaml compose.prod.yaml set: | - *.cache-from=type=gha,scope=${{github.ref}}-e2e - *.cache-from=type=gha,scope=${{github.ref}} + *.cache-from=type=gha,scope=${{ github.ref }}-e2e + *.cache-from=type=gha,scope=${{ github.ref }} *.cache-from=type=gha,scope=refs/heads/main - *.cache-to=type=gha,scope=${{github.ref}}-e2e,mode=max + *.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max - name: Start Services run: docker compose up --wait --no-build @@ -176,14 +176,44 @@ jobs: path: pwa/test-results lint: - name: Docker Lint + name: Lint runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + + # Lint Dockerfiles - name: Lint Dockerfiles uses: hadolint/hadolint-action@v3.1.0 with: recursive: true + + # Lint API PHP files + - + name: PHP CS Fixer Cache + uses: actions/cache@v3 + with: + path: api/.php-cs-fixer.cache + key: ${{ runner.OS }}-phpcsfixer-${{ github.sha }} + restore-keys: | + ${{ runner.OS }}-phpcsfixer- + - + name: Get API changed files + id: api-changed-files + uses: tj-actions/changed-files@v38 + - + name: Get Extra Arguments for PHP-CS-Fixer + id: phpcs-intersection + run: | + CHANGED_FILES=$(echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}" | tr ' ' '\n') + if ! echo "${CHANGED_FILES}" | grep -qE "^api\/(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi + echo "PHPCS_EXTRA_ARGS<> $GITHUB_ENV + echo "$EXTRA_ARGS" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - + name: Lint API PHP Files + uses: docker://oskarstark/php-cs-fixer-ga + with: + args: --config=api/.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${{ env.PHPCS_EXTRA_ARGS }}" From 4c86baedf4f784cf9d7f2a6c245863f8d1242b3e Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:13:30 +0100 Subject: [PATCH 08/13] chore: improve playwright cache --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c08fb7988..a929d9780 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,7 @@ jobs: run: docker compose run --rm php bin/console doctrine:fixtures:load --no-interaction - name: Cache Playwright Binaries + id: playwright-cache uses: actions/cache@v3 with: path: ~/.cache/ms-playwright @@ -153,9 +154,15 @@ jobs: working-directory: pwa run: pnpm install - - name: Install Playwright Browsers + name: Install Playwright Browsers with Deps + if: steps.playwright-cache.outputs.cache-hit != 'true' working-directory: pwa run: pnpm exec playwright install --with-deps + - + name: Install Playwright Browsers + if: steps.playwright-cache.outputs.cache-hit == 'true' + working-directory: pwa + run: pnpm exec playwright install - name: Run Playwright @read working-directory: pwa From 4de8486be2203e9ea4849e0ae106891c26b675bb Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:27:29 +0100 Subject: [PATCH 09/13] chore: lint pwa files --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a929d9780..d8ce18cb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,9 +71,6 @@ jobs: - name: Run PHPStan run: docker compose exec -T php vendor/bin/phpstan --memory-limit=256M - - - name: Lint PWA - run: docker compose exec -T pwa pnpm lint # run e2e tests iso-prod e2e-tests: @@ -140,7 +137,7 @@ jobs: name: Install PNPM uses: pnpm/action-setup@v2 with: - version: 8.6.2 + version: 8 - name: Cache PNPM uses: actions/cache@v3 @@ -197,7 +194,7 @@ jobs: with: recursive: true - # Lint API PHP files + # Lint API - name: PHP CS Fixer Cache uses: actions/cache@v3 @@ -220,7 +217,30 @@ jobs: echo "$EXTRA_ARGS" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - - name: Lint API PHP Files + name: Lint API uses: docker://oskarstark/php-cs-fixer-ga with: args: --config=api/.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${{ env.PHPCS_EXTRA_ARGS }}" + + # Lint PWA + - + name: Install PNPM + uses: pnpm/action-setup@v2 + with: + version: 8 + - + name: Cache PNPM + uses: actions/cache@v3 + with: + path: ${{ env.PNPM_HOME }} + key: ${{ runner.os }}-pnpm-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-pnpm- + - + name: Install Dependencies + working-directory: pwa + run: pnpm install + - + name: Lint PWA + working-directory: pwa + run: pnpm lint From 6b389c2bdc7456cf3afc343f21119db2a08464cc Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:37:17 +0100 Subject: [PATCH 10/13] chore: clean k6 github action --- .github/workflows/check.yml | 8 ++++---- k6/test.sh | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 22844c0b3..6426063c0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Check on: workflow_call: @@ -18,9 +18,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - - name: Run local k6 test - uses: grafana/k6-action@v0.2.0 + - + name: Run local k6 test + uses: grafana/k6-action@v0.3.1 with: filename: k6/script.js flags: --out json=results.json diff --git a/k6/test.sh b/k6/test.sh index d45ad2ad9..dd95e9525 100755 --- a/k6/test.sh +++ b/k6/test.sh @@ -1,9 +1,12 @@ #!/bin/bash + cd $(dirname $0) + if [ -z "$TARGET" ]; then - echo "Missing TARGET=pr-xxx-demo.api-platform.com" 1>&2 + echo "Missing TARGET argument (e.g.: pr-123-demo.api-platform.com)" 1>&2 exit 1 fi + docker run \ --name k6 \ --rm -i \ From 0fe26d12f3c074e0d60e2ae4cef372001b51d649 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:59:02 +0100 Subject: [PATCH 11/13] chore: lint helm chart --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .github/workflows/deploy.yml | 4 ---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8ce18cb8..7b742a18e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -244,3 +244,22 @@ jobs: name: Lint PWA working-directory: pwa run: pnpm lint + + # Lint HELM + - + name: Cache Helm Dependencies + uses: actions/cache@v3 + with: + path: helm/api-platform/charts/ + key: ${{ runner.os }}-helm-dependencies-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-helm-dependencies- + - + name: Build Helm Dependencies + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami/ + helm repo add stable https://charts.helm.sh/stable/ + helm dependency build ./helm/api-platform + - + name: Lint Helm + run: helm lint ./helm/api-platform/ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d92f13302..ce7561daa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -76,16 +76,12 @@ jobs: key: ${{ runner.os }}-helm-dependencies-${{ github.run_id }} restore-keys: | ${{ runner.os }}-helm-dependencies- - # https://github.com/helm/helm/issues/8036 - name: Build Helm Dependencies run: | helm repo add bitnami https://charts.bitnami.com/bitnami/ helm repo add stable https://charts.helm.sh/stable/ helm dependency build ./helm/api-platform - - - name: Lint Helm - run: helm lint ./helm/api-platform/ # Release name MUST start with a letter - name: Deploy From f8809cfe84899315780532d4303dffb102bfa213 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:03:06 +0100 Subject: [PATCH 12/13] chore: lint markdown docs --- .github/workflows/ci.yml | 8 ++++++++ docs/.markdown-lint.yaml | 1 + 2 files changed, 9 insertions(+) create mode 100644 docs/.markdown-lint.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b742a18e..795690be4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -263,3 +263,11 @@ jobs: - name: Lint Helm run: helm lint ./helm/api-platform/ + + # Lint Markdown Docs + - + name: Lint changelog file + uses: docker://avtodev/markdown-lint:v1 + with: + config: 'docs/.markdown-lint.yaml' + args: 'docs/**/*.md' diff --git a/docs/.markdown-lint.yaml b/docs/.markdown-lint.yaml new file mode 100644 index 000000000..ff7d7cc82 --- /dev/null +++ b/docs/.markdown-lint.yaml @@ -0,0 +1 @@ +MD013: false From 4110ff37a51533eee676ed28a81ca8a1b9e9397f Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:40:28 +0100 Subject: [PATCH 13/13] chore: improve cleanup job --- .github/workflows/cleanup.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 8ab93c945..6607e214d 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -8,6 +8,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +env: + GKE_CLUSTER: api-platform-demo + GCE_ZONE: europe-west1-c + jobs: cleanup: name: Uninstall K8s Release for Closed Pull Request @@ -32,7 +36,7 @@ jobs: run: | gcloud components install gke-gcloud-auth-plugin gcloud --quiet auth configure-docker - gcloud container clusters get-credentials api-platform-demo --zone europe-west1-c + gcloud container clusters get-credentials ${{ env.GKE_CLUSTER }} --zone ${{ env.GCE_ZONE }} - name: Check for existing namespace id: k8s-namespace