Skip to content

Commit

Permalink
Use env variables for cert paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippluca committed Dec 20, 2024
1 parent c56d5f6 commit 1c2e7eb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set environment variables
run: |
echo PEM_CERT_PATH=$(pwd)/certs/geopilot.pem >> $GITHUB_ENV
echo UBUNTU_TRUSTED_CERT_PATH=/usr/local/share/ca-certificates/geopilot.crt >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
Expand All @@ -22,13 +27,13 @@ jobs:
- name: Create dev-certs
run: |
mkdir ./certs
dotnet dev-certs https --export-path ./certs/geopilot.pem --no-password --format PEM
dotnet dev-certs https --export-path ${{ env.PEM_CERT_PATH }} --no-password --format PEM
chmod -R 664 ./certs/*
- name: Trust dev-certs
run: |
sudo apt-get install -y ca-certificates
sudo cp ./certs/geopilot.pem /usr/local/share/ca-certificates/geopilot.crt
sudo cp ${{ env.PEM_CERT_PATH }} ${{ env.UBUNTU_TRUSTED_CERT_PATH }}
sudo update-ca-certificates
- name: Start db and api's
Expand All @@ -44,4 +49,4 @@ jobs:
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/geopilot.crt
NODE_EXTRA_CA_CERTS: ${{ env.UBUNTU_TRUSTED_CERT_PATH }}

0 comments on commit 1c2e7eb

Please sign in to comment.