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

Start setup for GitHub workflow #7

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/review-build-url-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Post Review Build URL to PR
on:
pull_request:
types: [opened]
jobs:
example:
name: Post to PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: get-branch-name-sanitized
name: Sanitize branch name
shell: bash
run: echo "::set-output name=branch::$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH" | tr -cd '[a-zA-Z0-9]-' | cut -b 1-40)"
- name: Post Review Build URL
if: startsWith(steps.get-branch-name-sanitized.outputs.branch, 'feature')
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Branch name is correct"
check_for_duplicate_msg: true
17 changes: 17 additions & 0 deletions .github/workflows/review-build-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

name: Post Review Build URL to PR
on:
pull_request:
types: [opened]
jobs:
branch_name:
runs-on: ubuntu-latest
name: Branch Name
steps:
- uses: actions/checkout@v2
with:
branch_pattern: 'feature'
comment_for_invalid_branch_name: 'This branch name is not following the standards. Name should start with feature/'
fail_if_invalid_branch_name: 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}