Skip to content

[ALS-5505] Update to add 'and' to scanner filter when more than one filter condition exists #384

[ALS-5505] Update to add 'and' to scanner filter when more than one filter condition exists

[ALS-5505] Update to add 'and' to scanner filter when more than one filter condition exists #384

#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
name: Mainline Protection
on:
pull_request:
types: [opened, synchronize, edited, reopened]
# The purpose of this workflow is to create a failing Status check on pull request against mainline. This will prevent
# PR from being merged into mainline.
jobs:
mainline-protection:
name: Only create PR against develop branches, not mainline branch
runs-on: ubuntu-20.04
steps:
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: mainline protection
if: steps.branch-name.outputs.base_ref_branch == 'mainline'
run: |
echo "PR has target branch ${{ steps.branch-name.outputs.base_ref_branch }}. Failing workflow..."
exit 1