From b407b2721379e316d68252977157a991bd97340e Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Thu, 13 Jun 2024 13:08:50 +0530 Subject: [PATCH 1/3] use yarn starship instead of starship directly --- action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index a16c870..345b27f 100644 --- a/action.yaml +++ b/action.yaml @@ -125,12 +125,12 @@ runs: if: inputs.cli-version != '0.0.0' # Skip if cli-version is 0.0.0, expected to be used for local testing run: | yarn global add @starship-ci/cli@${{ inputs.cli-version }} - starship --version + yarn starship --version shell: bash - name: Setup starship helm repo run: | - starship setup \ + yarn starship setup \ --helmName ${{ inputs.name }} \ --helmVersion ${{ inputs.version }} \ --helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \ @@ -144,7 +144,7 @@ runs: run: | helm delete ${{ inputs.name }} --debug --namespace ${{ steps.set-namespace.outputs.namespace }} --wait || true sleep 5 - starship start \ + yarn starship start \ --helmName ${{ inputs.name }} \ --helmVersion ${{ inputs.version }} \ --helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \ @@ -175,7 +175,7 @@ runs: helm delete ${{ inputs.name }} --debug --namespace ${{ steps.set-namespace.outputs.namespace }} --wait || true sleep 5 kubectl get pods --namespace ${{ steps.set-namespace.outputs.namespace }} - starship start \ + yarn starship start \ --helmName ${{ inputs.name }} \ --helmVersion ${{ inputs.version }} \ --helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \ From 9f6417951e45ba242ba904f511ceeda0344ccdc3 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Thu, 13 Jun 2024 13:14:48 +0530 Subject: [PATCH 2/3] add a way to add package.json and yarn.lock file together. --- action.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 345b27f..c257ad3 100644 --- a/action.yaml +++ b/action.yaml @@ -49,12 +49,16 @@ runs: using: composite steps: - - name: Create yarn.lock file if not exists + - name: Create yarn.lock and package.json file if not exists run: | if [ ! -f $GITHUB_WORKSPACE/yarn.lock ]; then echo 'Creating temporary yarn.lock file' echo '' > $GITHUB_WORKSPACE/yarn.lock fi + if [ ! -f $GITHUB_WORKSPACE/package.json ]; then + echo 'Creating temporary package.json file' + echo '{}' > $GITHUB_WORKSPACE/package.json + fi shell: bash - name: Setup Node.js From f6ddd46744cfc38edd52f9fd5cf3ccbb2cadd863 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Thu, 13 Jun 2024 13:18:33 +0530 Subject: [PATCH 3/3] remove use of global --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index c257ad3..8652aaf 100644 --- a/action.yaml +++ b/action.yaml @@ -128,7 +128,7 @@ runs: - name: Setup starshipjs client if: inputs.cli-version != '0.0.0' # Skip if cli-version is 0.0.0, expected to be used for local testing run: | - yarn global add @starship-ci/cli@${{ inputs.cli-version }} + yarn add @starship-ci/cli@${{ inputs.cli-version }} yarn starship --version shell: bash