Skip to content

Commit aacc265

Browse files
committed
ci: track k8s bm workflow as part of file changes
This commit tracks the k8s bm workflow as part of file changes ensures that the workflow is triggered when the workflow file is changed Signed-off-by: vprashar2929 <[email protected]>
1 parent 3932315 commit aacc265

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/k8s-bm.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- 'config/**/*.go'
2828
- 'go.mod'
2929
- 'go.sum'
30+
- '.github/workflows/k8s-bm.yaml'
3031
3132
build-and-deploy:
3233
# NOTE: In case of self-hosted runners, tools like docker, make, kubectl etc. are installed at the time of setting up the runner.
@@ -134,25 +135,22 @@ jobs:
134135
curl -s http://localhost:28282/metrics || true
135136
echo "::endgroup::"
136137
137-
cleanup:
138-
needs: [check-changes, build-and-deploy]
139-
runs-on: self-hosted
140-
# NOTE: Run even if the previous job fails
141-
if: always() && needs.check-changes.outputs.changes == 'true'
142-
steps:
143-
- name: Checkout source
144-
uses: actions/checkout@v5
145-
with:
146-
ref: ${{ github.event.pull_request.head.sha }}
147-
148-
# NOTE: Ensure that all deployments and built images are properly cleaned up
138+
# NOTE: Ensure that all deployments, built images and cluster are properly cleaned up
149139
# to prevent residual resources
150140
- name: Undeploy Kepler
141+
if: always()
151142
shell: bash
152143
run: |
153144
make undeploy
154145
146+
- name: Remove kind cluster
147+
if: always()
148+
shell: bash
149+
run: |
150+
make cluster-down
151+
155152
- name: Clean Docker images
153+
if: always()
156154
shell: bash
157155
run: |
158156
docker image prune -af

0 commit comments

Comments
 (0)