Skip to content

Commit 72cbee0

Browse files
committed
fix: k8-db-downgrade environment name
1 parent 07efbf6 commit 72cbee0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/k8s_db_downgrade.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ permissions:
2323
jobs:
2424
k8-db-downgrade:
2525
name: 'K8: Database Downgrade'
26-
runs-on: [self-hosted, "${{ github.ref_name }}"]
27-
environment: ${{ github.ref_name }}
26+
runs-on: [self-hosted, "${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}"]
27+
environment: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
2828
env:
29+
ENVIRONMENT_NAME: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
2930
KUBELOGIN_VERSION: "v0.0.25"
3031
KUBERNETES_CLUSTER_REPO_NAME: "${{ vars.KUBERNETES_CLUSTER_REPO_NAME }}"
3132
KUBERNETES_CLUSTER_NAME: "${{ vars.KUBERNETES_CLUSTER_NAME }}"
@@ -69,7 +70,7 @@ jobs:
6970
shell: bash
7071
run: |
7172
bash cicd-deployment-scripts/k8s/db_downgrade.sh \
72-
-e ${{ github.ref_name }} \
73+
-e ${{ env.ENVIRONMENT_NAME }} \
7374
-d ${{ github.event.repository.name }} \
7475
-p ${{ github.workspace }}/${{ env.KUBERNETES_CLUSTER_REPO_NAME }} \
7576
-n ${{ env.KUBERNETES_NAMESPACE }} \

0 commit comments

Comments
 (0)