Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test patch #718

Closed
wants to merge 16 commits into from
86 changes: 86 additions & 0 deletions .github/workflows/run_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
## Canary CI/CD
name: Patch
run-name: Patch

on:
push:
branches:
- '*'

workflow_dispatch:
inputs:
branch:
description: 'branch name'
required: false
default: 'master'
# scripts-to-execute:
# description: 'scripts to execute'
# required: false
# type: string
# default: 'build lint type-check test'
# is-patch-version:
# description: "patch version"
# required: true
# type: boolean
# default: false


jobs:
# set_stage_variable:
# runs-on: ubuntu-latest
# outputs:
# id: stage
# value: ${{ steps.stage.outputs.stage }}
# steps:
# - name: Output stage
# id: stage
# run: |
# if [[ "${{ inputs.is-patch-version }}" == "true" ]]; then
# stage="patch"
# else
# stage="canary"
# fi
# echo $stage
# echo "stage=${stage}" >> $GITHUB_OUTPUT
get_branch_name:
runs-on: ubuntu-latest
outputs:
id: branch-name
value: ${{ steps.branch-name.outputs.name }}
steps:
- name: Output branch name
id: name
run: |
name=${GITHUB_REF#refs/heads/}
echo $name
echo "name=${name}" >> $GITHUB_OUTPUT
echo "github.ref ---->"
echo ${{ github.ref }}
checkout_code:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PLAYER_GITHUB_BOT_TOKEN }}
ref: ${{ needs.branch-name.outputs.branch-name }}
- name: Verify Checked-Out Branch
run: |
checked_out_branch=$(git rev-parse --abbrev-ref HEAD)
echo "checked out branch --->"
echo $checked_out_branch
if [ "$checked_out_branch" != "${GITHUB_REF#refs/heads/}" ]; then
echo "Error: Checked out branch ($checked_out_branch) does not match the workflow branch (${GITHUB_REF#refs/heads/})"
fi
canary:
uses: kaltura/playkit-js-common/.github/workflows/canary_player.yaml@lian-test-canary
secrets: inherit
with:
node-version: "20.x"
player-type: "ovp tv"
schema-type: "playerV3Versions"
tests-yarn-run-to-execute: 'build lint type-check test'
yarn-upgrade-list: ""
# is-patch-version: ${{ inputs.is-patch-version }}
# stage: $STAGE_VALUE
# stage: ${{ needs.set_stage_variable.outputs.stage }}
Loading