Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit c6d2bad

Browse files
committed
chore: pass env variables to github_env
1 parent 1a6d5a0 commit c6d2bad

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/actions/deploy_to_kubernetes/action.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ inputs:
1414
runs:
1515
using: composite
1616
steps:
17+
- name: Setup Environment variables
18+
run: |
19+
echo "NAMESPACE=${{ inputs.K8S_NAMESPACE }}" >> "$GITHUB_ENV"
20+
echo "KUBE_SERVER=${{ inputs.KUBE_SERVER }}" >> "$GITHUB_ENV"
21+
echo "SERVICEACCOUNT_TOKEN=${{ inputs.SERVICEACCOUNT_TOKEN }}" >> "$GITHUB_ENV"
22+
echo "CA_CRT=${{ inputs.CA_CRT }}" >> "$GITHUB_ENV"
23+
echo "APP_NAME=deriv-api-docs" >> "$GITHUB_ENV"
24+
shell: bash
1725
- name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
18-
run: |
19-
export NAMESPACE=${{ inputs.K8S_NAMESPACE }}
26+
run: |
2027
git clone https://github.com/binary-com/devops-ci-scripts
2128
cd devops-ci-scripts/k8s-build_tools
2229
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
2330
export CA="ca.crt"
24-
./release.sh deriv-com-api ${{ inputs.K8S_VERSION }}
31+
./release.sh ${APP_NAME} ${{ inputs.K8S_VERSION }}
2532
shell: bash

.github/actions/publish_to_docker/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
DOCKERHUB_PASSWORD:
1818
description: Docker Hub password
1919
required: true
20-
runs:
20+
runs:
2121
using: composite
2222
steps:
2323
- name: Building docker image 🐳
@@ -26,13 +26,13 @@ runs:
2626
shell: bash
2727
- name: Verify nginx image
2828
run: |
29-
set -e
30-
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
31-
echo "docker image validated successfully"
29+
set -e
30+
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
31+
echo "docker image validated successfully"
3232
shell: bash
3333
- name: Pushing Image to docker hub 🐳
3434
run: |
35-
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u $${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
35+
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u ${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
3636
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
3737
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
3838
shell: bash

.github/workflows/release_production.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
K8S_VERSION: ${{ github.ref_name }}
4848
K8S_NAMESPACE: 'deriv-com-api-production'
4949
CA_CRT: ${{ secrets.CA_CRT }}
50+
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
51+
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
52+
5053
send_slack_notification:
5154
name: Send Slack Notification
5255
environment: Production

.github/workflows/release_staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ jobs:
4040
K8S_VERSION: ${{ github.ref_name }}
4141
K8S_NAMESPACE: 'deriv-com-api-staging'
4242
CA_CRT: ${{ secrets.CA_CRT }}
43+
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
44+
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}

0 commit comments

Comments
 (0)