feat: Add an entrypoint to perform env setup#11
Conversation
9417d82 to
46b4f6f
Compare
f4ca184 to
bdcbfc6
Compare
6859a9d to
18a273b
Compare
61e21c1 to
92c9e7c
Compare
| echo "Preparing Rust build environment" | ||
|
|
||
|
|
||
| if [ -n "${FRC_SSH_KEY}" ]; then |
There was a problem hiding this comment.
Can you clarify a bit why is this needed? Can we just mount ssh socket -v $SSH_AUTH_SOCK:/ssh.sock -e SSH_AUTH_SOCK=/ssh.sock?
There was a problem hiding this comment.
This was taken on from our existing scripts. I don't think GitHub sets up an ssh socket with a configured ssh key natively. The container is started before we start any jobs, so we can't set up a socket in the workflow before this is launched; if you know some way to do that with git workflows shout though!
There was a problem hiding this comment.
Yeah, and in docker-build action we set it up manually:
7fef141 to
a8f79a8
Compare
8917d0b to
f634a57
Compare
f634a57 to
f0265af
Compare
| ( | ||
| ssh-keyscan -H gitlab.com | ||
| ssh-keyscan -H github.com | ||
| ) >> "$SSH_HOME/.ssh/known_hosts" |
There was a problem hiding this comment.
can we move these to build stage? (into a RUN statement)
| color = 'always' | ||
| [net] | ||
| git-fetch-with-cli = true | ||
| EOF |
There was a problem hiding this comment.
can we just COPY or ADD this to the container? does it need to happen at runtime?
| echo "CARGO_HOME=${CARGO_HOME}" | ||
| echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" | ||
| ) >> "$GITHUB_ENV" | ||
| fi |
There was a problem hiding this comment.
how does this work? this script is run insede the container but GITHUB_ENV is host variable in ci
This is needed for the new test workflow. Everything this adds is inert unless you run the new workflow, so this shouldn't break anything (but it will increase image sizes).