33 push :
44 branches :
55 - master
6- env :
7- RELEASE_TYPE : Staging
86jobs :
97 build_and_publish :
108 name : Builds and Publishes to Cloudflare Pages Staging
119 runs-on : ubuntu-latest # TODO: Replace this with the appropriate runner for Deriv-Api-Docs when provided
1210 environment : Staging
13- outputs :
14- RELEASE_VERSION : ${{ steps.extract_version.outputs.RELEASE_VERSION }}
1511 steps :
1612 - name : Checkout
1713 uses : actions/checkout@v4
@@ -29,30 +25,13 @@ jobs:
2925 uses : ./.github/actions/versioning
3026 with :
3127 RELEASE_TAG : ${{ github.sha }}
32- RELEASE_TYPE : ${{ env.RELEASE_TYPE }}
33- - name : Extract version
34- id : extract_version
35- run : echo "RELEASE_VERSION=${version}" >> $GITHUB_OUTPUT
28+ RELEASE_TYPE : staging
3629 - name : Publish to Cloudflare Pages Staging
3730 uses : ./.github/actions/publish_to_pages_staging
3831 with :
3932 CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4033 CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
41- - name : Upload Build Artifact
42- uses : actions/upload-artifact@v4
43- with :
44- name : build
45- path : .
46- retention-days : 1
47-
48- build_and_publish_to_docker_k8s :
49- name : Builds and Publishes image to Docker and Kubernetes
50- runs-on : ubuntu-latest
51- environment : Staging
52- needs : [build_and_publish]
53- steps :
5434 - name : Publish to Docker
55- id : publish_to_docker
5635 uses : ./.github/actions/publish_to_docker
5736 with :
5837 DOCKER_LATEST_IMAGE_TAG : ' latest-staging'
6140 DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
6241 DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
6342 - name : Deploy to Kubernetes
64- id : deploy_to_kubernetes
6543 uses : ./.github/actions/deploy_to_kubernetes
6644 with :
6745 K8S_VERSION : ${{ github.ref_name }}
7048 SERVICEACCOUNT_TOKEN : ${{ secrets.SERVICEACCOUNT_TOKEN }}
7149 KUBE_SERVER : ${{ secrets.KUBE_SERVER }}
7250 DOCKERHUB_ORGANISATION : ${{ secrets.DOCKERHUB_ORGANISATION }}
73- - name : Send Slack Notification
74- if : ${{ steps.publish_to_docker.outcome != 'success' || steps.deploy_to_kubernetes.outcome != 'success' }}
75- uses : ./.github/actions/notify_slack
76- with :
77- RELEASE_TYPE : ${{ env.RELEASE_TYPE }}
78- MESSAGE : " '${{ env.RELEASE_TYPE }}' Docker Publish and Kubernetes Deployment for api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}'* has Failed *"
0 commit comments