You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to host Github actions on AWS EKS. I got it all setup, but because I use a private docker container hosted on ECR, EKS cannot pull the image from ECR without first authenticating docker. And because ECR doesn't provide static credentials (they expire after 12 hours), using the workflow docker credentials options won't work for very long. So I need a way to run a script before the runner executes, get the current password for ECR, and pass that to docker login (aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin [ECR_REPO]
However, there is currently no way to supply the ACTIONS_RUNNER_HOOK_JOB_STARTED value, and even if we could, specifying a filename won't work because the file won't exist on the runner.
So I propose the following: Allow values.yaml to include the following:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to host Github actions on AWS EKS. I got it all setup, but because I use a private docker container hosted on ECR, EKS cannot pull the image from ECR without first authenticating docker. And because ECR doesn't provide static credentials (they expire after 12 hours), using the workflow docker credentials options won't work for very long. So I need a way to run a script before the runner executes, get the current password for ECR, and pass that to docker login (
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin [ECR_REPO]
As per https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job , you can provide a
ACTIONS_RUNNER_HOOK_JOB_STARTED
env var with a path to a shell file that runs before the job. I want to use this to run thedocker login
command so that the runner can pull from ECR.However, there is currently no way to supply the
ACTIONS_RUNNER_HOOK_JOB_STARTED
value, and even if we could, specifying a filename won't work because the file won't exist on the runner.So I propose the following: Allow values.yaml to include the following:
The helm chart would then insert that script into the file system and set the ACTIONS_RUNNER_HOOK_JOB_STARTED environment variable as needed.
Unless there is another way to do this?
Beta Was this translation helpful? Give feedback.
All reactions