Skip to content

Commit 8e77465

Browse files
ci: fetch data plan on release build (#46)
1 parent e7c7519 commit 8e77465

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Sync Higgs Shop Data Plan
2+
3+
on: [ workflow_dispatch ]
4+
5+
jobs:
6+
fetch-data-plan:
7+
name: Fetch Data Plan
8+
uses: mParticle/mparticle-workflows/.github/workflows/data-plan-fetch.yml@stable
9+
with:
10+
data_plan_id: higgs_shop_basic_data_plan
11+
data_plan_version: 1
12+
app_relative_path: core-sdk-samples/higgs-shop-sample-app
13+
secrets:
14+
WORKSPACE_ID: ${{ secrets.HIGGS_SHOP_WORKSPACE_ID }}
15+
CLIENT_ID: ${{ secrets.HIGGS_SHOP_CLIENT_ID }}
16+
CLIENT_SECRET: ${{ secrets.HIGGS_SHOP_CLIENT_SECRET }}
17+
18+
19+
open-pull-request:
20+
name: Open Pull Request for Data Plan
21+
runs-on: ubuntu-latest
22+
needs: fetch-data-plan
23+
env:
24+
GIT_AUTHOR_NAME: mparticle-bot
25+
GIT_AUTHOR_EMAIL: [email protected]
26+
GIT_COMMITTER_NAME: mparticle-bot
27+
GIT_COMMITTER_EMAIL: [email protected]
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
with:
32+
ref: development
33+
34+
- name: Download Data Plan Artifacts
35+
uses: actions/download-artifact@v3
36+
with:
37+
name: higgs-shop-dataplan
38+
path: core-sdk-samples/higgs-shop-sample-app/dataplans
39+
40+
- name: "Import GPG Key"
41+
uses: crazy-max/ghaction-import-gpg@v4
42+
with:
43+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
44+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
45+
git_user_signingkey: true
46+
git_commit_gpgsign: true
47+
48+
- name: Create Commit if Data Plan Changed
49+
uses: stefanzweifel/git-auto-commit-action@v4
50+
with:
51+
commit_message: "chore: update Higgs Shop Data Plan"
52+
branch: chore/data-plan-update-${{ github.run_number }}
53+
create_branch: true
54+
commit_user_name: mparticle-bot
55+
commit_author_email: [email protected]
56+
commit_author: mparticle-bot
57+
file_pattern: core-sdk-samples/higgs-shop-sample-app/dataplans/*
58+
59+
- name: Open Pull Request
60+
uses: vsoch/[email protected]
61+
env:
62+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
63+
PULL_REQUEST_BRANCH: development
64+
PULL_REQUEST_FROM_BRANCH: chore/data-plan-update-${{ github.run_number }}
65+
PULL_REQUEST_TITLE: "chore: update Higgs Shop Data Plan"
66+
PULL_REQUEST_DRAFT: "Updating Higgs Shop Data Plan"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)