dannymartinm commented on a change in pull request #16511: URL: https://github.com/apache/beam/pull/16511#discussion_r791214920
########## File path: .github/dockerized-gh-actions-runners/self-hosted-linux/docker/entrypoint.sh ########## @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +sudo chmod 666 /var/run/docker.sock + +registration_url="https://api.github.com/repos/$GITHUB_REPO/beam/actions/runners/registration-token" +echo "Requesting registration URL at '${registration_url}'" +GITHUB_TOKEN=$(echo $GITHUB_TOKEN) #scaping GITHUB_TOKEN variable +payload=$(curl -sX POST -H "Authorization: token $GITHUB_TOKEN" ${registration_url}) +RUNNER_TOKEN=$(echo $payload | jq '.token' --raw-output) Review comment: Hi @ashb , thanks for your comments. We worked in my fork of the repo and used my personal token, we tested it there. For creating the new runners attached to the beam repo, we would only need an access token with specific scopes. Regarding the runners group, I wasn't aware of that, thank you for the information. I’ve found this in the documentation: [Moving a self-hosted runner to a group](https://docs.github.com/en/enterprise-cloud@latest/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group) , it seems that we can add a self-hosted runner to a group once is created. I was wondering, and I think it would be better as we are using k8s, if it's possible to get the registration_url from a runner group and update the URL (line 20). Thank you. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
