Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative Rector workflow on check repo before steps run #3440

Merged
merged 6 commits into from
Mar 2, 2023

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Mar 2, 2023

@TomasVotruba this is alternative PR of:

which move the check on before steps instead of before strategy.

Closes #3439

-
if: github.event.pull_request.head.repo.full_name != github.repository
uses: actions/checkout@v3
- run: echo "run on ${{ github.event.pull_request.head.repo.full_name }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomasVotruba this is to verify the repo name to verify and it show:

Run echo "run on rectorphp/rector-src"
run on rectorphp/rector-src

see https://github.com/rectorphp/rector-src/actions/runs/4316268191/jobs/7531815857#step:3:1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull_request.head seems goes to forks repo name
while github.repository goes to target repo name, so I changed to github.event.pull_request.head.repo.full_name

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba let's give it a try?

@jackbentley you need to rebase your PR #3430 again to verify if it keep works after this merged.

@TomasVotruba TomasVotruba merged commit f56a053 into main Mar 2, 2023
@TomasVotruba TomasVotruba deleted the alternative-rector-workflow branch March 2, 2023 18:28
@TomasVotruba
Copy link
Member

Let's try it out 🙏

@samsonasik
Copy link
Member Author

@TomasVotruba it doesn't work, it now show pending on PR from fork, see #3430 (comment)

samsonasik added a commit that referenced this pull request May 8, 2023
* Alternative Rector workflow on check repo before steps run

* show display repo name to check

* check full name

* try add unused property

* [ci-review] Rector Rectify

* update templaet

---------

Co-authored-by: GitHub Action <actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants