I have this step to install Composer package using Gitea Actions for my CI build:
- name: Install Composer
run: |
set -e
curl -k https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
echo “Composer installed successfully”
However, when running it I encounter issues and asks for SSL (eg. Error:0A000086:SSL routines::certificate verify failed)
I can run the same step on Docker Desktop on windows without a problem but when I try it on my Ubuntu (22.04) with Docker and I get this issue often.
I’m fairly new to Gitea-Actions/Runners and hopefully somebody can help.
I have solved it already.
What I did is merely copying, here are the steps:
- On my docker-compose.yml, I have binded the volume of my host - /etc/ssl/certs to the runner’s /etc/ssl/certs/
- Proceed with the runner’s registration
- From my workflow file, I added a step to copy the runner’s container certs path to the job’s container certs path:
- name: Copy SSL Certificates
run: |
docker cp {NAME OF YOUR RUNNER COINTAINER}:/etc/ssl/certs/ /etc/ssl/
echo “Copied SSL Certificates successfully!”
I know its not the elegant way but it works!
Still I cannot figure out how this is not an issue if I’m running on a Docker Desktop via Windows.