* [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI
@ 2022-01-17 9:07 Petr Vorel
2022-01-17 9:19 ` xuyang2018.jy
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2022-01-17 9:07 UTC (permalink / raw)
To: ltp
Matching github.repository instead of
github.event.pull_request.head.repo.full_name is what is required for
our workflow pushing directly to git (we very rarely use pull requests,
and not for big changes which includes doc changes).
This also revert 820cfe539b as it didn't fix the problem.
Fixes: 760fdf3a8f ("ci: Don't run wiki mirror on LTP forks")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Xu,
FYI ba99b81708 ("doc: Fix typo missing s in .all_filesystems")
verified it's working:
https://github.com/linux-test-project/ltp/actions/runs/1707090366
Kind regards,
Petr
.github/workflows/wiki-mirror.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/wiki-mirror.yml b/.github/workflows/wiki-mirror.yml
index 302667255b..36c7d8311e 100644
--- a/.github/workflows/wiki-mirror.yml
+++ b/.github/workflows/wiki-mirror.yml
@@ -11,7 +11,7 @@ on:
jobs:
mirror:
runs-on: ubuntu-latest
- if: ${{ github.event.pull_request.head.repo.full_name == 'linux-test-project/ltp' }}
+ if: ${{ github.repository == 'linux-test-project/ltp' }}
steps:
- name: Checkout LTP
uses: actions/checkout@v2
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI
2022-01-17 9:07 [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI Petr Vorel
@ 2022-01-17 9:19 ` xuyang2018.jy
2022-01-17 10:13 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: xuyang2018.jy @ 2022-01-17 9:19 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp@lists.linux.it
Hi Petr
> Matching github.repository instead of
> github.event.pull_request.head.repo.full_name is what is required for
> our workflow pushing directly to git (we very rarely use pull requests,
> and not for big changes which includes doc changes).
>
> This also revert 820cfe539b as it didn't fix the problem.
>
> Fixes: 760fdf3a8f ("ci: Don't run wiki mirror on LTP forks")
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> Hi Xu,
>
> FYI ba99b81708 ("doc: Fix typo missing s in .all_filesystems")
> verified it's working:
>
> https://github.com/linux-test-project/ltp/actions/runs/1707090366
I found this problem when doc/* patch isn't the last patch of a
patchset. But here it is a single patch.
Best Regards
Yang Xu
>
> Kind regards,
> Petr
>
> .github/workflows/wiki-mirror.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.github/workflows/wiki-mirror.yml b/.github/workflows/wiki-mirror.yml
> index 302667255b..36c7d8311e 100644
> --- a/.github/workflows/wiki-mirror.yml
> +++ b/.github/workflows/wiki-mirror.yml
> @@ -11,7 +11,7 @@ on:
> jobs:
> mirror:
> runs-on: ubuntu-latest
> - if: ${{ github.event.pull_request.head.repo.full_name == 'linux-test-project/ltp' }}
> + if: ${{ github.repository == 'linux-test-project/ltp' }}
> steps:
> - name: Checkout LTP
> uses: actions/checkout@v2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI
2022-01-17 9:19 ` xuyang2018.jy
@ 2022-01-17 10:13 ` Petr Vorel
2022-01-18 1:11 ` xuyang2018.jy
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2022-01-17 10:13 UTC (permalink / raw)
To: xuyang2018.jy@fujitsu.com; +Cc: ltp@lists.linux.it
Hi Xu,
> > FYI ba99b81708 ("doc: Fix typo missing s in .all_filesystems")
> > verified it's working:
> > https://github.com/linux-test-project/ltp/actions/runs/1707090366
> I found this problem when doc/* patch isn't the last patch of a
> patchset. But here it is a single patch.
Path check was removed in 820cfe539b ("ci/wiki-mirror: Don't check path").
Paths should be working not only on last commit, IMHO it evaluates all files in
push
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
"When using the push and pull_request events, you can configure a workflow to
run based on what file paths are changed. Path filters are not evaluated for
pushes of tags."
=> it should be working even If I revert 820cfe539b, because running that
workflow does not take long.
Verification it's working on my local repo:
I pushed few commits in my local branch:
https://github.com/pevik/ltp/commits/tmp
the last commit was on .github/workflows/wiki-mirror.yml adding:
+ paths:
+ - 'doc/**'
commit only in that branch (not in upstream):
aa7ec06d22 ("Revert "ci/wiki-mirror: Don't check path"")
Other commit was modifying repo to 'pevik/ltp'
https://github.com/pevik/ltp/actions/runs/1699238259/workflow
...
on:
push:
branches:
- master
- tmp
paths:
- 'doc/**'
jobs:
mirror:
runs-on: ubuntu-latest
if: ${{ github.repository == 'pevik/ltp' }}
...
and that push triggered CI:
https://github.com/pevik/ltp/actions/runs/1699228985
(failed because my local repo does not have rights)
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI
2022-01-17 10:13 ` Petr Vorel
@ 2022-01-18 1:11 ` xuyang2018.jy
0 siblings, 0 replies; 4+ messages in thread
From: xuyang2018.jy @ 2022-01-18 1:11 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp@lists.linux.it
Hi Petr
Now, I understand, thanks for your kindly explanation.
Best Regards
Yang Xu
> Hi Xu,
>
>>> FYI ba99b81708 ("doc: Fix typo missing s in .all_filesystems")
>>> verified it's working:
>
>>> https://github.com/linux-test-project/ltp/actions/runs/1707090366
>
>> I found this problem when doc/* patch isn't the last patch of a
>> patchset. But here it is a single patch.
> Path check was removed in 820cfe539b ("ci/wiki-mirror: Don't check path").
>
> Paths should be working not only on last commit, IMHO it evaluates all files in
> push
> https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
> "When using the push and pull_request events, you can configure a workflow to
> run based on what file paths are changed. Path filters are not evaluated for
> pushes of tags."
>
> => it should be working even If I revert 820cfe539b, because running that
> workflow does not take long.
>
>
> Verification it's working on my local repo:
>
> I pushed few commits in my local branch:
> https://github.com/pevik/ltp/commits/tmp
> the last commit was on .github/workflows/wiki-mirror.yml adding:
> + paths:
> + - 'doc/**'
>
> commit only in that branch (not in upstream):
> aa7ec06d22 ("Revert "ci/wiki-mirror: Don't check path"")
>
> Other commit was modifying repo to 'pevik/ltp'
>
> https://github.com/pevik/ltp/actions/runs/1699238259/workflow
> ...
> on:
> push:
> branches:
> - master
> - tmp
> paths:
> - 'doc/**'
>
> jobs:
> mirror:
> runs-on: ubuntu-latest
> if: ${{ github.repository == 'pevik/ltp' }}
> ...
>
> and that push triggered CI:
> https://github.com/pevik/ltp/actions/runs/1699228985
> (failed because my local repo does not have rights)
>
> Kind regards,
> Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-18 1:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-17 9:07 [LTP] [COMMITTED][PATCH] ci/wiki-mirror: Fix triggering CI Petr Vorel
2022-01-17 9:19 ` xuyang2018.jy
2022-01-17 10:13 ` Petr Vorel
2022-01-18 1:11 ` xuyang2018.jy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox