Skip to content

Merge pull request #43 from Pyrrha-Platform/dependabot/npm_and_yarn/e… #12

Merge pull request #43 from Pyrrha-Platform/dependabot/npm_and_yarn/e…

Merge pull request #43 from Pyrrha-Platform/dependabot/npm_and_yarn/e… #12

Workflow file for this run

# This workflow will build a docker container, publish it to IBM Container Registry,
# and deploy it to an existing IKS cluster
name: Build and Deploy Dev
on:
workflow_dispatch:
push:
branches:
- main
# Environment variables available to all jobs and steps in this workflow
env:
GITHUB_SHA: ${{ github.sha }}
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY_DEV }}
IBM_CLOUD_REGION: ${{ secrets.IBM_CLOUD_REGION_DEV }}
IBM_CLOUD_RESOURCE_GROUP: ${{ secrets.IBM_CLOUD_RESOURCE_GROUP_DEV }}
ICR_REGION: ${{ secrets.ICR_REGION_DEV }}
ICR_NAMESPACE: ${{ secrets.ICR_NAMESPACE_DEV }}
ICR_REGISTRY_HOSTNAME: ${{secrets.ICR_REGISTRY_HOSTNAME_DEV}}
IKS_CLUSTER: ${{ secrets.IKS_CLUSTER_DEV }}
K8S_CLUSTER_NAMESPACE: ${{ secrets.K8S_CLUSTER_NAMESPACE_DEV }}
IKS_DEPLOYMENT_NAME: ${{ secrets.IKS_DEPLOYMENT_NAME_DEV }}
CONTAINER_NAME: ${{ secrets.CONTAINER_NAME_DEV }}
IMAGE_NAME: ${{ secrets.IMAGE_NAME_DEV }}
jobs:
setup-build-publish-deploy-dev:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Turnstyle ensures that this job only runs one at a time in this repository
- name: Turnstyle
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: call-for-code/build-push-deploy@main
with:
cloud-api-key: $IBM_CLOUD_API_KEY
cloud-region: $IBM_CLOUD_REGION
icr-region: $ICR_REGION
cloud-resource-group: $IBM_CLOUD_RESOURCE_GROUP
deployment-name: $IKS_DEPLOYMENT_NAME
container-name: $CONTAINER_NAME
github-sha: $GITHUB_SHA
icr-namespace: $ICR_NAMESPACE
image-name: $IMAGE_NAME
k8s-cluster-name: $IKS_CLUSTER
k8s-cluster-namespace: $K8S_CLUSTER_NAMESPACE
registry-hostname: $ICR_REGISTRY_HOSTNAME
working-directory: "."