From 14b92ab859ffa2a6d2183c1a32b70421494be8b6 Mon Sep 17 00:00:00 2001 From: Alejandra Escobar Date: Thu, 23 May 2024 14:32:37 +0100 Subject: [PATCH] Remove gh actions - branch.yml CI action. Our team doesn't need that. --- .github/workflows/branch.yml | 44 ------------------------------------ .nf-core.yml | 2 +- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 .github/workflows/branch.yml diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml deleted file mode 100644 index 0228046..0000000 --- a/.github/workflows/branch.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: nf-core branch protection -# This workflow is triggered on PRs to master branch on the repository -# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev` -on: - pull_request_target: - branches: [master] - -jobs: - test: - runs-on: ubuntu-latest - steps: - # PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches - - name: Check PRs - if: github.repository == 'ebi-metagenomics/shallowmapping' - run: | - { [[ ${{github.event.pull_request.head.repo.full_name }} == ebi-metagenomics/shallowmapping ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] - - # If the above check failed, post a comment on the PR explaining the failure - # NOTE - this doesn't currently 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@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 - with: - message: | - ## This PR is against the `master` branch :x: - - * Do not close this PR - * Click _Edit_ and change the `base` to `dev` - * This CI test will remain failed until you push a new commit - - --- - - 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 }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch. - The `master` branch on nf-core repositories should always contain code from the latest release. - Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch. - - You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page. - Note that even after this, the test will continue to show as failing until you push a new commit. - - Thanks again for your contribution! - repo-token: ${{ secrets.GITHUB_TOKEN }} - allow-repeats: false diff --git a/.nf-core.yml b/.nf-core.yml index f455298..bde5d45 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -5,7 +5,6 @@ lint: - docs/ - docs/output.md - docs/README.md - - docs/README.md - docs/usage.md - docs/images/nf-core-shallowmapping_logo_dark.png - docs/images/nf-core-shallowmapping_logo_light.png @@ -13,6 +12,7 @@ lint: - .gitignore - .github/ISSUE_TEMPLATE/config.yml - .github/workflows/* + - .github/workflows/branch.yml - .github/CONTRIBUTING.md - .github/PULL_REQUEST_TEMPLATE.md - conf/igenomes.config