Continuous Deployment: add connect to admin

We can now connect to a remote admin server in the CD environment by using the new "deploy-connect-to-admin" label in the PR.
This commit is contained in:
David Négrier
2022-02-17 15:04:51 +01:00
parent eae6c2c5e3
commit e36a1f1ced
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -149,6 +149,10 @@ jobs:
# Create a slugified value of the branch
- uses: rlespinasse/github-slug-action@3.1.0
- name: Set ADMIN_URL if "deploy-connect-to-admin" label is set
run: echo "ADMIN_API_URL=https://${{ github.event_name == 'pull_request' && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }}.test.workadventu.re" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-connect-to-admin') }}
- name: Write certificate
run: echo "${CERTS_PRIVATE_KEY}" > secret.key && chmod 0600 secret.key
env: