Skip to content

Fix MCAD CI check to validate special characters in branch name #21

Fix MCAD CI check to validate special characters in branch name

Fix MCAD CI check to validate special characters in branch name #21

Workflow file for this run

# This workflow will build mcad and run unit test and E2E tests
name: MCAD-CI
on:
pull_request:
branches:
- 'main'
- 'release-*'
jobs:
MCAD-CI:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
with:
ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0
- name: Set latest tag and Branch name
run: |

Check failure on line 21 in .github/workflows/mcad-CI.yml

View workflow run for this annotation

GitHub Actions / MCAD-CI

Invalid workflow file

The workflow is not valid. .github/workflows/mcad-CI.yml (Line: 21, Col: 14): Unexpected symbol: '|'. Located at position 36 within expression: github.event.pull_request.head.ref | sed 's/[^A-Za-z0-9._-]/-/g'
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref | sed 's/[^A-Za-z0-9._-]/-/g' }}" >> $GITHUB_ENV
echo "TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.10
- name: Build
run:
make mcad-controller
- name: Run Unit tests
run: make run-test
- name: Build Image
run: |
make images -e GIT_BRANCH=${{ env.GIT_BRANCH }} TAG=${{ env.GIT_BRANCH }}-${{ env.TAG }}
- name: Run E2E tests
run: |
make run-e2e -e GIT_BRANCH=${{ env.GIT_BRANCH }} TAG=${{ env.GIT_BRANCH }}-${{ env.TAG }}