Skip to content

[ALS-5081] Update to fix button not being present #317

[ALS-5081] Update to fix button not being present

[ALS-5081] Update to fix button not being present #317

#
# 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/[email protected]
- 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