Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/sync-higgs-shop-data-plan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Sync Higgs Shop Data Plan
Comment thread
alexs-mparticle marked this conversation as resolved.

on: [ workflow_dispatch ]

jobs:
fetch-data-plan:
name: Fetch Data Plan
uses: mParticle/mparticle-workflows/.github/workflows/data-plan-fetch.yml@stable
with:
data_plan_id: higgs_shop_basic_data_plan
data_plan_version: 1
app_relative_path: core-sdk-samples/higgs-shop-sample-app
secrets:
WORKSPACE_ID: ${{ secrets.HIGGS_SHOP_WORKSPACE_ID }}
CLIENT_ID: ${{ secrets.HIGGS_SHOP_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.HIGGS_SHOP_CLIENT_SECRET }}


open-pull-request:
name: Open Pull Request for Data Plan
runs-on: ubuntu-latest
needs: fetch-data-plan
env:
GIT_AUTHOR_NAME: mparticle-bot
GIT_AUTHOR_EMAIL: developers@mparticle.com
GIT_COMMITTER_NAME: mparticle-bot
GIT_COMMITTER_EMAIL: developers@mparticle.com
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: development

- name: Download Data Plan Artifacts
uses: actions/download-artifact@v3
with:
name: higgs-shop-dataplan
path: core-sdk-samples/higgs-shop-sample-app/dataplans

- name: "Import GPG Key"
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Create Commit if Data Plan Changed
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: update Higgs Shop Data Plan"
branch: chore/data-plan-update-${{ github.run_number }}
create_branch: true
commit_user_name: mparticle-bot
commit_author_email: developers@mparticle.com
commit_author: mparticle-bot
file_pattern: core-sdk-samples/higgs-shop-sample-app/dataplans/*

- name: Open Pull Request
uses: vsoch/pull-request-action@1.0.19
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PULL_REQUEST_BRANCH: development
PULL_REQUEST_FROM_BRANCH: chore/data-plan-update-${{ github.run_number }}
PULL_REQUEST_TITLE: "chore: update Higgs Shop Data Plan"
PULL_REQUEST_DRAFT: "Updating Higgs Shop Data Plan"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@