-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.19 KB
/
default.yml
File metadata and controls
36 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Create Scratch Org and retrieve Metadata
on:
workflow_dispatch:
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: |
npm install --ignore-scripts --global @salesforce/cli
- name: Retrieve from Scratch Org
env:
SFDX_AUTH_URL_DEVHUB: ${{ secrets.SFDX_AUTH_URL_DEVHUB }}
run: |
echo "${SFDX_AUTH_URL_DEVHUB}" | sf org login sfdx-url --set-default-dev-hub --alias devhub --sfdx-url-stdin
sf org create scratch -f config/project-scratch-def.json --alias scratch-org-shape --set-default
rm -rf force-app/main
sf project generate manifest --from-org scratch-org-shape
sf project retrieve start --manifest package.xml
- name: Create Pull Request
uses: stefanzweifel/git-auto-commit-action@v7
with:
file_pattern: force-app
commit_message: "feat: retrieve Metadata from Scratch Org"
- name: Delete scratch org
if: always()
run: |
sf org delete scratch -p