actions icon indicating copy to clipboard operation
actions copied to clipboard

CI new pull request always fails?

Open nahakyuu opened this issue 2 years ago • 6 comments

https://github.com/yiisoft/yii-debug-api/actions/workflows/rector.yml?query=is%3Afailure

nahakyuu avatar Jun 10 '23 01:06 nahakyuu

Rector workflow make commit and now fail on pull request from forks.

Can you try change /.github/workflow/rector.yml in your PR to this code:

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

name: rector

jobs:
  rector:
    uses: yiisoft/actions/.github/workflows/rector.yml@master
    secrets:
      token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
    with:
      os: >-
        ['ubuntu-latest']
      php: >-
        ['8.0']

?

vjik avatar Jun 10 '23 11:06 vjik

YIISOFT_GITHUB_TOKEN isn't passed to forks.

samdark avatar Jun 10 '23 14:06 samdark

I think it's a good idea to fall back to regular GitHub token if YIISOFT_GITHUB_TOKEN isn't available.

samdark avatar Jun 10 '23 14:06 samdark

But it's should be available in PR to origin repository

vjik avatar Jun 10 '23 14:06 vjik

No.

image

samdark avatar Jun 10 '23 15:06 samdark

Fall back already exist...

vjik avatar Jun 11 '23 17:06 vjik