Skip to content

trigger

trigger #909

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:
# Triggers the workflow on push or pull request events but only for the master branch
repository_dispatch:
types: [trigger]
workflow_dispatch:
inputs:
BRANCH:
description: Hkube branch to clone (e.g. master, release_v1_3)
required: true
default: master
# 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"
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
# 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
- uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- name: env
run: |
echo BRANCH=${BRANCH:-master} >> $GITHUB_ENV
env:
BRANCH: '${{ github.event.client_payload.BRANCH || github.event.inputs.BRANCH }}'
- run: |
./scripts/version.sh
export TAG=$(jq -r .fullSystemVersion ./version.json)
echo TAG=$TAG >> $GITHUB_ENV
cat ./version.json
env:
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
- name: trigger
id: trigger
uses: octokit/[email protected]
with:
route: POST /repos/kube-HPC/helm/dispatches
event_type: trigger
client_payload: "{\"BRANCH\": \"${{env.BRANCH}}\", \"TAG\":\"${{env.TAG}}\" }"
env:
GITHUB_TOKEN: '${{ secrets.GH_TOKEN }}'