I would like to use a docker-file to build services on github actions. To doing what I need the username and the absolute path of a directory and put into my docker-compose file. I found how to find the username and the path Here but I don’t know how to modify values in my file.
If anyone has any idea I would be grateful if they could help me.
Depending on what you want to do, Variable Substitution in the compose file might be enough to do what you need. Use variables in the compose file, set the matching environment variable in the job, and it should just work.
If that’s not enough, you could generate the compose file from a template, either with simple search and replace (e.g. using
sed) or with some sort of script that can generate YAML syntax.