Skip to content

Commit

Permalink
Fix step name for production release
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Sep 17, 2024
1 parent 7cd38ab commit 9eeae5e
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 34 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/feature-test-2gp copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: 2GP Feature Test

on:
workflow_call:
inputs:
org:
required: false
default: feature
type: string
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:cumulusci-next
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 ${{ inputs.org }} org as default org
run: cci org default ${{ inputs.org }}
- name: Build Feature Test Package
env:
GITHUB_TOKEN: '${{ secrets.github-token }}'
run: cci flow run build_feature_test_package $([[ "${{ inputs.debug }}" == "true" ]] && echo " --debug") | tee cumulusci-flow.log
shell: bash
- name: Set Commit Status
env:
GITHUB_TOKEN: '${{ secrets.github-token }}'
run: |
VERSION=$(cat cumulusci-flow.log | grep -o -E -m 1 "04t[a-zA-Z0-9]{15}")
gh api \
--method POST \
-H "Accept: application/vnd.github.v3+json" \
'/repos/${{ github.repository }}/statuses/${{ github.sha }}' \
-f state='success' \
-f description="version_id: $VERSION" \
-f context='Build Feature Test Package'
shell: bash
- name: Run Feature Test
env:
GITHUB_TOKEN: '${{ secrets.github-token }}'
run: cci flow run ci_feature_2gp
- name: Delete Scratch Org
if: ${{ always() }}
run: |
cci org scratch_delete feature
shell: bash
42 changes: 21 additions & 21 deletions .github/workflows/release-1gp-env.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Production Release

on:
workflow_call:
inputs:
env-name:
required: true
type: string
debug:
required: false
default: false
type: boolean
secrets:
dev-hub-auth-url:
required: true
packaging-org-auth-url:
required: true
gh-email:
required: true
github-token:
required: true
workflow_call:
inputs:
env-name:
required: true
type: string
debug:
required: false
default: false
type: boolean
secrets:
dev-hub-auth-url:
required: true
packaging-org-auth-url:
required: true
gh-email:
required: true
github-token:
required: true

jobs:
beta-test:
release-test:
name: "Production Release"
runs-on: ubuntu-latest
environment: ${{ inputs.env-name }}
Expand All @@ -34,7 +34,7 @@ jobs:
env:
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}"
PACKAGING_ORG_AUTH_URL: "${{ secrets.packaging-org-auth-url }}"
CUMULUSCI_SERVICE_github: "{ \"username\": \"${{ github.actor }}\", \"token\": \"${{ secrets.github-token }}\", \"email\": \"${{ secrets.gh-email }}\" }"
CUMULUSCI_SERVICE_github: '{ "username": "${{ github.actor }}", "token": "${{ secrets.github-token }}", "email": "${{ secrets.gh-email }}" }'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -50,5 +50,5 @@ jobs:
- name: Delete Scratch Org
if: ${{ always() }}
run: |
cci org scratch_delete release
cci org scratch_delete release
shell: bash
26 changes: 13 additions & 13 deletions .github/workflows/release-1gp.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Production Release

on:
workflow_call:
secrets:
dev-hub-auth-url:
required: true
packaging-org-auth-url:
required: true
gh-email:
required: true
github-token:
required: true
workflow_call:
secrets:
dev-hub-auth-url:
required: true
packaging-org-auth-url:
required: true
gh-email:
required: true
github-token:
required: true

jobs:
beta-test:
release-test:
name: "Production Release"
runs-on: ubuntu-latest
container:
Expand All @@ -25,7 +25,7 @@ jobs:
env:
DEV_HUB_AUTH_URL: "${{ secrets.dev-hub-auth-url }}"
PACKAGING_ORG_AUTH_URL: "${{ secrets.packaging-org-auth-url }}"
CUMULUSCI_SERVICE_github: "{ \"username\": \"${{ github.actor }}\", \"token\": \"${{ secrets.github-token }}\", \"email\": \"${{ secrets.gh-email }}\" }"
CUMULUSCI_SERVICE_github: '{ "username": "${{ github.actor }}", "token": "${{ secrets.github-token }}", "email": "${{ secrets.gh-email }}" }'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -41,5 +41,5 @@ jobs:
- name: Delete Scratch Org
if: ${{ always() }}
run: |
cci org scratch_delete release
cci org scratch_delete release
shell: bash

0 comments on commit 9eeae5e

Please sign in to comment.