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

Commit d9b235c

Browse files
Merge pull request #261 from binary-com/ako/use-correct-syntax
Ako/ use correct syntax on the action
2 parents 1d754ce + d4364f0 commit d9b235c

File tree

2 files changed

+30
-35
lines changed

2 files changed

+30
-35
lines changed

.github/actions/deploy_to_kubernetes/action.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@ inputs:
44
K8S_VERSION:
55
description: Kubernetes version
66
required: true
7-
type: string
87
K8S_NAMESPACE:
98
description: Kubernetes namespace
109
required: false
11-
type: string
1210
default: 'deriv-com-api-staging'
1311
CA_CRT:
1412
description: Kubernetes CA certificate
1513
required: true
16-
type: string
17-
steps:
18-
- k8s/install-kubectl
19-
- run:
20-
name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
21-
command: |
22-
export NAMESPACE=${{ inputs.K8S_NAMESPACE }}
23-
git clone https://github.com/binary-com/devops-ci-scripts
24-
cd devops-ci-scripts/k8s-build_tools
25-
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
26-
export CA="ca.crt"
27-
./release.sh deriv-com-api ${{ inputs.K8S_VERSION }}
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
18+
run: |
19+
export NAMESPACE=${{ inputs.K8S_NAMESPACE }}
20+
git clone https://github.com/binary-com/devops-ci-scripts
21+
cd devops-ci-scripts/k8s-build_tools
22+
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
23+
export CA="ca.crt"
24+
./release.sh deriv-com-api ${{ inputs.K8S_VERSION }}
25+
shell: bash

.github/actions/publish_to_docker/action.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,34 @@ inputs:
55
description: Docker image tag
66
required: false
77
default: 'latest-staging'
8-
type: string
98
DOCKER_IMAGE_TAG:
109
description: Docker image tag
1110
required: true
12-
type: string
1311
DOCKERHUB_ORGANISATION:
1412
description: Docker Hub organisation
1513
required: true
16-
type: string
1714
DOCKERHUB_USERNAME:
1815
description: Docker Hub username
1916
required: true
20-
type: string
2117
DOCKERHUB_PASSWORD:
2218
description: Docker Hub password
2319
required: true
24-
type: string
20+
runs:
21+
using: composite
2522
steps:
26-
- setup_remote_docker
27-
- run:
28-
name: Building docker image 🐳
29-
command: |
30-
docker build -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }} -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} .
31-
- name: Verify nginx image
32-
run: |
33-
set -e
34-
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
35-
echo "docker image validated successfully"
36-
- run:
37-
name: Pushing Image to docker hub 🐳
38-
command: |
39-
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u $${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
40-
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
41-
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
23+
- name: Building docker image 🐳
24+
run: |
25+
docker build -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }} -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} .
26+
shell: bash
27+
- name: Verify nginx image
28+
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"
32+
shell: bash
33+
- name: Pushing Image to docker hub 🐳
34+
run: |
35+
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u $${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
36+
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
37+
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
38+
shell: bash

0 commit comments

Comments
 (0)