Search code examples
github-actionssalesforce-cli

SFDX & Github Action - Warning: force:auth:sfdxurl:store is not a sfdx command


I have the following yaml file. It were working just fine until yesterday. Unfortunately starting from today received the below warning and followed by the following error.

Hope someone will be able to point me to solution to fixed this issue. Below is the yaml code

name: CI_dev

on:
  pull_request:
    branches: [ dev ]

jobs:
  test_pipeline:
    runs-on: ubuntu-latest
    
    steps:
    # Install Salesforce CLI
    - name: Install Salesforce CLI
      run: |
          wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
          mkdir sfdx-cli
          tar xJf sfdx-linux-amd64.tar.xz -C sfdx-cli --strip-components 1
          ./sfdx-cli/install
          
    #Checkout master
    - name: 'checkout master'
      uses: actions/checkout@master

    #read secret, authenticate and deploy
    - name: 'Populate auth file with SFDX_URL secret'
      shell: bash
      run: 'echo ${{ secrets.secret}} > ./secret.txt'

    - name: 'Authenticate'
      run: 'sfdx force:auth:sfdxurl:store --sfdxurlfile=./secret.txt -a secretAlias' 
      
    - name: 'Deploy'
      run: "sfdx force:source:deploy --sourcepath ./force-app/main/default -l RunLocalTests -u secretAlias"

Below is the warning that appear on the authenticate step

Warning: force:auth:sfdxurl:store is not a sfdx command.
Did you mean auth:sfdxurl:store? [y/n]: 

And below is the error that appear on the Deploy step

ERROR running force:source:deploy:  No org configuration found for name secretAlias
Error: Process completed with exit code 1.

Solution

  • sfdx (at least linux distributions) have recently updated from 7.82.1 to 7.83.1 (January 2021)

    since 7.83.1 it follows different syntax format. You need to remove force: from your 'Authenticate' command line as it is advised in error message.

    You can look your current version with:

    sfdx --version