1

I have my yml file for my github action set up like this:

name: Test Deploy Delta

on: 
  push:
  workflow_dispatch:
jobs:
build:
runs-on: windows-latest

steps:
- name: Check out repository code
  uses: actions/checkout@v2
    
# Install Salesforce CLI
- name: Install Salesforce CLI 
  run: |
    npm install sfdx-cli
    node_modules/sfdx-cli/bin/run version

- name: Install sfdxGit delta
  run: |
    echo y | node_modules/sfdx-cli/bin/run plugins:install sfdx-git-delta
    node_modules/sfdx-cli/bin/run plugins

- name: Generate SFDX Delta Package
  run: |
    mkdir changes
    node_modules/sfdx-cli/bin/run sgd:source:delta --to test-branch --from master --output changes
    echo "--- package.xml generated with added and modified metadata ---"
    cat changes/package/package.xml
    echo ""
    echo "--- destructiveChanges.xml generated with deleted metadata ---"
    cat changes/destructiveChanges/destructiveChanges.xml
    echo

Where I am using the sfdx-git-delta plugin to optimize a deploy. When I run sfdx sgd:source:delta --to test-branch --from master --output changes in my VS Code terminal, I get a package.xml in my changes folder that has the differences between the branches, which there are. When this github action runs, though. it always produces an empty package.xml and I have no idea why.

I do not understand why this is failing in the github action. The node_modules/sfdx-cli/bin/run version command returns sfdx-cli/7.102.0 linux-x64 node-v14.17.0 and all sfdx-git-delta requires is node 14.6.0, so that shouldn't be a problem. It should have everything it needs.

1 Answer 1

1

Please try to execute this command before you will execute sgd

git fetch origin "+refs/heads/*:refs/remotes/origin/*"

You must log in to answer this question.

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