Skip to content

Commit

Permalink
Add create-scratch-org workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Oct 31, 2023
1 parent c239e06 commit ff0081e
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/create-scratch-unmanaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 2GP Feature Test

on:
workflow_call:
inputs:
debug:
required: false
default: false
type: boolean

secrets:
# Either dev-hub-auth-url or dev-hub-username, dev-hub-client-id, and dev-hub-private-key are required
dev-hub-auth-url:
required: false
dev-hub-username:
required: false
dev-hub-client-id:
required: false
dev-hub-private-key:
required: false
gh-email:
required: true
github-token:
required: true

jobs:
feature-test:
name: "2GP Feature Test"
runs-on: ubuntu-latest
container:
image: ghcr.io/muselab-d2x/d2x:prototype
options: --user root
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github-token }}
env:
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}"
DEV_HUB_USERNAME: "${{ secrets.dev-hub-username }}"
DEV_HUB_CLIENT_ID: "${{ secrets.dev-hub-client-id }}"
DEV_HUB_PRIVATE_KEY: "${{ secrets.dev-hub-private-key }}"
CUMULUSCI_SERVICE_github: "{ \"username\": \"${{ github.actor }}\", \"token\": \"${{ secrets.github-token }}\", \"email\": \"${{ secrets.gh-email }}\" }"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Auth to DevHub
run: /usr/local/bin/devhub.sh
- name: Set feature org as default org
run: cci org default feature
- name: Configure for Apex Tests
env:
GITHUB_TOKEN: '${{ secrets.github-token }}'
run: cci org info
shell: bash
- name: Save Scratch Org
if: ${{ always() }}
run: |
cci org github_export ${{ github.sha }}_feature feature
shell: bash
#- name: Delete Scratch Org
# if: ${{ always() }}
# run: |
# cci org scratch_delete feature
# shell: bash

0 comments on commit ff0081e

Please sign in to comment.