From 21c6ef9289dc56cd59b3697aa7485588935109e1 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 14:57:31 +0200 Subject: [PATCH] ci: add github actions --- .github/workflows/az_acr_push.yml | 15 +++++++++++++++ .github/workflows/k8s_deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/k8s_test.yml | 19 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows/az_acr_push.yml create mode 100644 .github/workflows/k8s_deploy.yml create mode 100644 .github/workflows/k8s_test.yml diff --git a/.github/workflows/az_acr_push.yml b/.github/workflows/az_acr_push.yml new file mode 100644 index 00000000..379cd949 --- /dev/null +++ b/.github/workflows/az_acr_push.yml @@ -0,0 +1,15 @@ +name: 'ACR: Docker Push' + +on: + workflow_dispatch: + + push: + branches: + - "**" + tags-ignore: + - "**" + +jobs: + call-az-acr-push: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/az_acr_push.yml@dev + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/k8s_deploy.yml b/.github/workflows/k8s_deploy.yml new file mode 100644 index 00000000..0c308651 --- /dev/null +++ b/.github/workflows/k8s_deploy.yml @@ -0,0 +1,22 @@ +name: 'K8: Prepare Deployment' # rename + +on: + # workflow_dispatch: + release: + types: [prereleased] + pull_request: + branches: + - dev + types: [closed] + +# Special permissions required for OIDC authentication +permissions: + id-token: write + contents: read + actions: read + +jobs: + call-k8-release: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/k8s_release.yml@dev + if: github.event_name == 'pull_request' && github.event.pull_request.merged || github.event_name == 'release' + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/k8s_test.yml b/.github/workflows/k8s_test.yml new file mode 100644 index 00000000..0c39c07b --- /dev/null +++ b/.github/workflows/k8s_test.yml @@ -0,0 +1,19 @@ +name: 'K8: Test' + +on: + pull_request: + types: [opened, synchronize, reopened] + +# Special permissions required for OIDC authentication +permissions: + id-token: write + contents: read + actions: read + + +jobs: + call-k8-test: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/k8s_test.yml@dev + secrets: inherit + with: + test_cmd: 'pytest' \ No newline at end of file