Skip to content

trigger

trigger #975

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI-MAIN
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
repository_dispatch:
types: [trigger]
workflow_dispatch:
inputs:
version:
description: Version to install
required: true
default: latest
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: create kubeconfig
run: |
echo "$KUBE_CONFIG_DATA" | base64 --decode > /tmp/config
chmod go-r /tmp/config
echo KUBECONFIG=/tmp/config >> $GITHUB_ENV
env:
KUBE_CONFIG_DATA: ${{ secrets.CICD_KUBECONFIG }}
- name: verify kubectl
run: kubectl cluster-info
- name: deploy
run: ./deploy.sh ${{ secrets.HKUBE_DOMAIN_RAW }}
env:
DOCKER_BUILD_PUSH_PASSWORD: ${{ secrets.DOCKER_BUILD_PUSH_PASSWORD }}
DOCKER_BUILD_PUSH_USERNAME: ${{ secrets.DOCKER_BUILD_PUSH_USERNAME }}
VERSION: ${{ github.event.client_payload.version || github.event.inputs.version }}
test:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v2
- name: create kubeconfig
run: |
echo "$KUBE_CONFIG_DATA" | base64 --decode > /tmp/config
echo KUBECONFIG=/tmp/config >> $GITHUB_ENV
env:
KUBE_CONFIG_DATA: ${{ secrets.CICD_KUBECONFIG }}
- name: verify kubectl
run: kubectl cluster-info
- name: test
run: ./test.sh
env:
KUBERNETES_MASTER_IP: ${{ secrets.CICD_KUBERNETES_MASTER_IP }}