Skip to content

Commit

Permalink
fix(ci): gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeannesson committed Aug 7, 2023
2 parents 29e562d + 09b3628 commit 1dfcb12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/check_pull_requets_source_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ name: Check pull request source branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- opened
- reopened
- synchronize

jobs:
check-branches:
name: Check branches
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "dev" ] && [ ${{ github.base_ref }} == "main" ]
then
echo "Merge requests to main branch are only allowed from dev branch."
exit 1
env:
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
if: '[ "$HEAD_REF" != "dev" ] && [ "$BASE_REF" == "main" ]'
run:
echo "Merge requests to main branch are only allowed from dev branch."
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}

5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<a>
<img src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/napse-investment/40fac957532fe3b731c99067467de842/raw/django-napse-coverage.json" alt="Coverage" />
</a>
<a>
<img src="https://img.shields.io/github/v/tag/napse-invest/django-napse?label=version" alt="Version" />
</a>
<a>
<img src="https://img.shields.io/github/v/release/napse-invest/django-napse" alt="Release" />
</a>
Expand All @@ -23,8 +20,6 @@
</p>
<br/>

[![Release](https://github.com/napse-invest/django-napse/actions/workflows/release.yml/badge.svg?branch=main&event=release)](https://github.com/napse-invest/django-napse/actions/workflows/release.yml)

## django-napse
...

Expand Down

0 comments on commit 1dfcb12

Please sign in to comment.