Unverified Commit b1888c3b authored by Chris Cheshire's avatar Chris Cheshire Committed by GitHub
Browse files

Merge pull request #124 from luslab/dev

Update changes
parents 3674b7f1 1795392b
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -28,6 +28,3 @@ jobs:
              "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/cutandrun/results-${{ github.sha }}"
            }
          profiles: test_full,aws_tower
          nextflow_config: |
            process.errorStrategy = 'retry'
            process.maxRetries = 3
+0 −3
Original line number Diff line number Diff line
@@ -23,6 +23,3 @@ jobs:
              "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/cutandrun/results-test-${{ github.sha }}"
            }
          profiles: test,aws_tower
          nextflow_config: |
            process.errorStrategy = 'retry'
            process.maxRetries = 3
+1 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ jobs:
      - name: Check PRs
        if: github.repository == 'nf-core/cutandrun'
        run: |
          "{ [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/cutandrun ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]"
          { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/cutandrun ]] && [[ $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
@@ -42,4 +42,3 @@ jobs:
            Thanks again for your contribution!
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          allow-repeats: false
#
+55 −0
Original line number Diff line number Diff line
name: Fix linting from a comment
on:
  issue_comment:
    types: [created]

jobs:
  deploy:
    # Only run if comment is on a PR with the main repo, and if it contains the magic keywords
    if: >
      contains(github.event.comment.html_url, '/pull/') &&
      contains(github.event.comment.body, '@nf-core-bot fix linting') &&
      github.repository == 'nf-core/cutandrun'
    runs-on: ubuntu-latest
    steps:
      # Use the @nf-core-bot token to check out so we can push later
      - uses: actions/checkout@v3
        with:
          token: ${{ secrets.nf_core_bot_auth_token }}

      # Action runs on the issue comment, so we don't get the PR by default
      # Use the gh cli to check out the PR
      - name: Checkout Pull Request
        run: gh pr checkout ${{ github.event.issue.number }}
        env:
          GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

      - uses: actions/setup-node@v2

      - name: Install Prettier
        run: npm install -g prettier @prettier/plugin-php

      # Check that we actually need to fix something
      - name: Run 'prettier --check'
        id: prettier_status
        run: |
          if prettier --check ${GITHUB_WORKSPACE}; then
            echo "::set-output name=result::pass"
          else
            echo "::set-output name=result::fail"
          fi

      - name: Run 'prettier --write'
        if: steps.prettier_status.outputs.result == 'fail'
        run: prettier --write ${GITHUB_WORKSPACE}

      - name: Commit & push changes
        if: steps.prettier_status.outputs.result == 'fail'
        run: |
          git config user.email "core@nf-co.re"
          git config user.name "nf-core-bot"
          git config push.default upstream
          git add .
          git status
          git commit -m "[automated] Fix linting with Prettier"
          git push
+1 −3
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ jobs:
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/

      - uses: actions/setup-python@v1
      - uses: actions/setup-python@v3
        with:
          python-version: "3.6"
          architecture: "x64"
@@ -78,5 +78,3 @@ jobs:
            lint_log.txt
            lint_results.md
            PR_number.txt

#
Loading