You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@apache.org by Zoran Regvart <zo...@regvart.com> on 2019/09/04 12:04:40 UTC

Re: Github Actions

Hi Francis,

On Tue, Aug 27, 2019 at 12:19 PM Francis Chuang
<fr...@apache.org> wrote:
>
> I have implemented the ability to generate the website and javadoc for
> Calcite using Github Actions. See:
> https://github.com/apache/calcite/tree/test-site/.github/workflows
>
> The missing piece is that we need the token to publish to our
> calcite-site repository to be added as a secret in Github Actions and
> there is currently no clear process as to whether this is allowed or how
> to get this done.

In your GitHub actions try cloning from github.com rather than
gitbox.apache.org, I think you'll find that you can push to a
github.com repository without authentication from a GitHub action.

zoran
-- 
Zoran Regvart

Re: Github Actions

Posted by Francis Chuang <fr...@apache.org>.
Many thanks for the example, Zoran.

I think I see the problem now. For camel-website you're running Github 
actions in camel-website, so I think it implicitly allows you to push to 
the same repo.

In my case, I have actions in calcite, calcite-avatica and 
calcite-avatica-go pushing to calcite-site. I was thinking I could 
reverse the relationship and store the actions in calcite-site (thus 
avoiding the need to authenticate), but I don't think GH actions allow 
triggering on events that originate from other repositories.

Francis

On 5/09/2019 4:31 pm, Zoran Regvart wrote:
> Hi Francis,
> either that little loophole was closed or you're missing `user.email`
> and `user.name` in your git config. Here's[1] how we used to do it for
> the Camel website.
> 
> zoran
> 
> [1] https://github.com/apache/camel-website/blob/master/.github/action-website/publish#L11-L12
> 
> On Thu, Sep 5, 2019 at 3:02 AM Francis Chuang <fr...@apache.org> wrote:
>>
>> Hi Zoran,
>>
>> I tired cloning from github.com, but pushing to it is still denied.
>>
>> If I don't set any credentials in git, it complains that there is no
>> username for github.com:
>> https://github.com/apache/calcite/commit/d55e389310dcd024ae96623692a1e0a67274873c/checks
>>
>> If I set the GITHUB_TOKEN as the credential, I get a 403:
>> https://github.com/apache/calcite/runs/212573263
>>
>> Francis
>>
>> On 4/09/2019 10:04 pm, Zoran Regvart wrote:
>>> Hi Francis,
>>>
>>> On Tue, Aug 27, 2019 at 12:19 PM Francis Chuang
>>> <fr...@apache.org> wrote:
>>>>
>>>> I have implemented the ability to generate the website and javadoc for
>>>> Calcite using Github Actions. See:
>>>> https://github.com/apache/calcite/tree/test-site/.github/workflows
>>>>
>>>> The missing piece is that we need the token to publish to our
>>>> calcite-site repository to be added as a secret in Github Actions and
>>>> there is currently no clear process as to whether this is allowed or how
>>>> to get this done.
>>>
>>> In your GitHub actions try cloning from github.com rather than
>>> gitbox.apache.org, I think you'll find that you can push to a
>>> github.com repository without authentication from a GitHub action.
>>>
>>> zoran
>>>
> 
> 
> 

Re: Github Actions

Posted by Zoran Regvart <zo...@regvart.com>.
Hi Francis,
either that little loophole was closed or you're missing `user.email`
and `user.name` in your git config. Here's[1] how we used to do it for
the Camel website.

zoran

[1] https://github.com/apache/camel-website/blob/master/.github/action-website/publish#L11-L12

On Thu, Sep 5, 2019 at 3:02 AM Francis Chuang <fr...@apache.org> wrote:
>
> Hi Zoran,
>
> I tired cloning from github.com, but pushing to it is still denied.
>
> If I don't set any credentials in git, it complains that there is no
> username for github.com:
> https://github.com/apache/calcite/commit/d55e389310dcd024ae96623692a1e0a67274873c/checks
>
> If I set the GITHUB_TOKEN as the credential, I get a 403:
> https://github.com/apache/calcite/runs/212573263
>
> Francis
>
> On 4/09/2019 10:04 pm, Zoran Regvart wrote:
> > Hi Francis,
> >
> > On Tue, Aug 27, 2019 at 12:19 PM Francis Chuang
> > <fr...@apache.org> wrote:
> >>
> >> I have implemented the ability to generate the website and javadoc for
> >> Calcite using Github Actions. See:
> >> https://github.com/apache/calcite/tree/test-site/.github/workflows
> >>
> >> The missing piece is that we need the token to publish to our
> >> calcite-site repository to be added as a secret in Github Actions and
> >> there is currently no clear process as to whether this is allowed or how
> >> to get this done.
> >
> > In your GitHub actions try cloning from github.com rather than
> > gitbox.apache.org, I think you'll find that you can push to a
> > github.com repository without authentication from a GitHub action.
> >
> > zoran
> >



-- 
Zoran Regvart

Re: Github Actions

Posted by Francis Chuang <fr...@apache.org>.
Hi Zoran,

I tired cloning from github.com, but pushing to it is still denied.

If I don't set any credentials in git, it complains that there is no 
username for github.com: 
https://github.com/apache/calcite/commit/d55e389310dcd024ae96623692a1e0a67274873c/checks

If I set the GITHUB_TOKEN as the credential, I get a 403: 
https://github.com/apache/calcite/runs/212573263

Francis

On 4/09/2019 10:04 pm, Zoran Regvart wrote:
> Hi Francis,
> 
> On Tue, Aug 27, 2019 at 12:19 PM Francis Chuang
> <fr...@apache.org> wrote:
>>
>> I have implemented the ability to generate the website and javadoc for
>> Calcite using Github Actions. See:
>> https://github.com/apache/calcite/tree/test-site/.github/workflows
>>
>> The missing piece is that we need the token to publish to our
>> calcite-site repository to be added as a secret in Github Actions and
>> there is currently no clear process as to whether this is allowed or how
>> to get this done.
> 
> In your GitHub actions try cloning from github.com rather than
> gitbox.apache.org, I think you'll find that you can push to a
> github.com repository without authentication from a GitHub action.
> 
> zoran
>