0

I am trying to configure a simple yaml file for github actions. Below is the YAML contents and also the error which I am getting.

Note: The same auth command works fine if I am running in the terminal.

name: Orgtest

on: 
  workflow_dispatch
  
  
jobs:
   installing-sfdx:  
     runs-on: ubuntu-latest 
     steps:
         - name: checking
           run:
              echo "This is a test first"
         - name: checking npm
           run:
              node -v  
         - name: installsfdx
           run: |
              npm install sfdx-cli --global
              sfdx --version
         - name: Authorizing the org
           run:
              sfdx force:auth:jwt:grant --clientid xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --jwtkeyfile ./buildfiles/server.key --username [email protected] --instanceurl https://domain-test.test1.sandbox.my.salesforce.com/
             



ERROR running auth:jwt:grant:  We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: ENOENT: no such file or directory, open '/home/runner/work/SalesforcePOC/SalesforcePOC/buildfiles/server.key'

1 Answer 1

0

Found the fix. I had to add an action for checking out a repo. Added the following code and it worked.

- name: Checkout Repo
           uses: actions/checkout@v3
           with:
            fetch-depth: 0     

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .