Validating To master, vinayak-dadhich tiggered GitHub Actions π #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
run-name: Validating To master, ${{ github.actor }} tiggered GitHub Actions π | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
branches: [ master ] | |
paths: | |
- 'force-app/**' | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
jobs: | |
Pull-Request-Action: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch path is ${{ github.ref }}, name is ${{ github.ref_name }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- run: echo "π‘ The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "π₯οΈ The workflow is now ready to test your code on the runner." | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- run: echo "π This job's status is ${{ job.status }}." | |
build: | |
runs-on: ubuntu-latest | |
environment: master | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install NPM | |
run: | | |
npm install | |
- name: 'Install Salesforce CLI' | |
run: | | |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz | |
mkdir ~/sfdx | |
tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1 | |
echo "$HOME/sfdx/bin" >> $GITHUB_PATH | |
~/sfdx/bin/sfdx version | |
- name: Install the sfdx-git-delta plugin | |
run: | | |
echo 'y' | sfdx plugins:install sfdx-git-delta | |
- name: Decrypt the server.key.enc file & store inside assets folder | |
run: | | |
openssl enc -nosalt -aes-256-cbc -d -in assets/server.key.enc -out assets/server.key -base64 -K DE3B4F6346E0CFA95CA695168A0FD8DA4D06AE808A0AFA9A4DBD2502D5DD6FE7 -iv AC767FEDCF2105140E84B62495C3F43A | |
- name: Authenticate Salesforce ORG | |
run: | | |
sfdx force:auth:jwt:grant -i 3MVG9ZL0ppGP5UrBIUp0vVLlmHx9wOBbqgn3CiGg4bAz.otqBO9YFS4PWiq7B4fBZvybN0SPcwepH83XEvpQO -f assets/server.key --username [email protected] -a HubOrg | |
- name: Generate the package.xml for delta files | |
run: | | |
mkdir changed-sources | |
sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --generate-delta --source force-app/ | |
- name: validate Delta components to Salesofrce | |
run: | | |
sfdx force:source:deploy -p "changed-sources/force-app" -u HubOrg --checkonly --testlevel NoTestRun --json | |
- name: 'validate destructive changes (if any)' | |
run: sfdx force:mdapi:deploy -d "changed-sources/destructiveChanges" -u HubOrg --checkonly --testlevel NoTestRun --ignorewarnings |