-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (56 loc) · 2 KB
/
push_deploy-to-dev1.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "[PUSH] Deploy to Dev"
on:
workflow_dispatch:
push:
branches:
- dev
paths:
- "force-app/**"
jobs:
deploy-metadata:
name: Create new package
runs-on: ubuntu-latest
steps:
# Checkout source code
- name: Checkout source code
uses: actions/checkout@v2
# Install SFDX
- name: Install SFDX
uses: navikt/crm-workflows-base/.github/actions/installSFDX@master
# Authenticate prod
- name: Authenticate prod
uses: navikt/crm-workflows-base/.github/actions/authenticateOrg@master
with:
auth-url: ${{ secrets.CRM_PROD_SFDX_URL }}
alias: prod
setDefaultUsername: false
setDefaultDevhubUsername: true
# Authenticate dev sandbox
- name: Authenticate dev sandbox
uses: navikt/crm-workflows-base/.github/actions/authenticateOrg@master
with:
auth-url: ${{ secrets.DEV_SFDX_URL }}
alias: dev
setDefaultUsername: true
setDefaultDevhubUsername: false
# Install sfpowerkit plugin used to install multiple packages only by version number
- name: Install sfpowerkit plugin
run: echo y | sfdx plugins:install [email protected]
# Get package keys
- name: Get package keys
id: install-keys
run: |
keys=""
for p in $(jq '.result | .[].Name' -r <<< "$(sfdx force:package:list --json)"); do
keys+=$p":${{ secrets.CRM_PACKAGE_KEY }} "
done
echo "name=keys$(echo $keys)" >> GITHUB_OUTPUT
# Install packages this repo is dependant on
- name: Install dependant packages
run: sfdx sfpowerkit:package:dependencies:install -u dev -r -a -w 60 -k '${{ steps.install-keys.outputs.keys }}'
# Install new package version into dev sandbox
- name: Install new package version into dev sandbox
if: success()
id: dev-installation
run: |
sfdx force:source:deploy -p force-app -u dev -l RunLocalTests