From 4391c61156822e0a191e3ce99fd6de8ae4e7995a Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:02:17 +0530 Subject: [PATCH] main.yml: Initial selfhosted support --- .github/workflows/main.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ad7a315..537f6c95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -133,12 +133,15 @@ jobs: # Download and configure 'crave'. - name: Configure the 'crave' environment run: | - curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s -- - mv ${PWD}/crave ${HOME}/bin/ - sudo ln -sf /home/${USER}/bin/crave /usr/bin/crave - - envsubst < ${PWD}/crave.conf.sample >> ${PWD}/crave.conf - rm -rf ${PWD}/crave.conf.sample + if [ "${DCDEVSPACE}" == "1" ]; then + echo 'No need to set up crave, we are already running in devspace!' + else + curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s -- + mv ${PWD}/crave ${HOME}/bin/ + sudo ln -sf /home/${USER}/bin/crave /usr/bin/crave + envsubst < ${PWD}/crave.conf.sample >> ${PWD}/crave.conf + rm -rf ${PWD}/crave.conf.sample + fi env: CRAVE_USERNAME: ${{ secrets.CRAVE_USERNAME }} CRAVE_TOKEN: ${{ secrets.CRAVE_TOKEN }}