diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 302cfef..d616186 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -1,9 +1,15 @@ name: Build Maven Package -on: [ push ] +on: + push: + branches: + - '**' + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, master ] jobs: - build: + package: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pr_to_master_from_hotfix_release_only.yml b/.github/workflows/pr_to_master_from_hotfix_release_only.yml deleted file mode 100644 index 41b9ee5..0000000 --- a/.github/workflows/pr_to_master_from_hotfix_release_only.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: PR to master branch from patch/release branch only - -on: - pull_request: - branches: - - master - -jobs: - test: - runs-on: ubuntu-latest - steps: - # PRs to the repository master branch are only ok if coming from any patch or release branch - - name: Check PRs - run: | - { [[ $GITHUB_HEAD_REF = *"release"* ]]; } || [[ $GITHUB_HEAD_REF == *"hotfix"* ]] - - - # If the above check failed, post a comment on the PR explaining the failure - # NOTE - this may not work if the PR is coming from a fork, due to limitations in GitHub actions secrets - - name: Post PR comment - if: failure() - uses: mshick/add-pr-comment@v1 - with: - message: | - Hi @${{ github.event.pull_request.user.login }}, - - It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch. - The `master` branch should always contain code from the latest release. - Because of this, PRs to `master` are only allowed if they come from any ${{github.event.pull_request.head.repo.full_name}} `release` or `hotfix` branch. - - You do not need to close this PR, you can change the target branch to `development` by clicking the _"Edit"_ button at the top of this page. - - Thanks again for your contribution! - repo-token: ${{ secrets.GITHUB_TOKEN }} - allow-repeats: false - diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0091150..5708a25 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,9 +1,15 @@ name: Run Maven Tests -on: [ push ] +on: + push: + branches: + - '**' + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, master ] jobs: - build: + test: runs-on: ubuntu-latest steps: