Skip to content

Commit 5ed851f

Browse files
committed
feat(workflow): add demo workflow for mage-remote-run integration
1 parent 3d627c6 commit 5ed851f

1 file changed

Lines changed: 21 additions & 29 deletions

File tree

.github/workflows/demo.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Mage Remote Run Demo
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches: [ "main" ]
76
pull_request:
87
branches: [ "main" ]
8+
workflow_dispatch:
99

1010
jobs:
11-
demo:
11+
demo-integration:
1212
runs-on: ubuntu-latest
13-
13+
name: Demo Integration
1414
steps:
1515
- uses: actions/checkout@v4
1616

@@ -19,31 +19,23 @@ jobs:
1919
with:
2020
node-version: '20'
2121

22-
- name: Install mage-remote-run
23-
run: npm install -g mage-remote-run
22+
- name: Configure Mage Remote Run
23+
uses: muench-dev/mage-remote-run-action@main
24+
with:
25+
profile-name: "PaaS-Instance"
26+
type: "ac-cloud-paas"
27+
url: ${{ secrets.MAGE_URL }}
28+
consumer-key: ${{ secrets.MAGE_CONSUMER_KEY }}
29+
consumer-secret: ${{ secrets.MAGE_CONSUMER_SECRET }}
30+
access-token: ${{ secrets.MAGE_ACCESS_TOKEN }}
31+
token-secret: ${{ secrets.MAGE_ACCESS_TOKEN_SECRET }}
32+
# Implicitly runs connection test unless no-test is true
33+
34+
- name: Verify Connection Status
35+
run: mage-remote-run connection status
2436

25-
- name: Configure Connection
26-
# In a real scenario, use GitHub Secrets for all sensitive values
27-
env:
28-
MAGE_URL: ${{ secrets.MAGE_URL || 'https://example.com' }}
29-
MAGE_CONSUMER_KEY: ${{ secrets.MAGE_CONSUMER_KEY || 'ck' }}
30-
MAGE_CONSUMER_SECRET: ${{ secrets.MAGE_CONSUMER_SECRET || 'cs' }}
31-
MAGE_ACCESS_TOKEN: ${{ secrets.MAGE_ACCESS_TOKEN || 'at' }}
32-
MAGE_ACCESS_TOKEN_SECRET: ${{ secrets.MAGE_ACCESS_TOKEN_SECRET || 'ts' }}
33-
run: |
34-
mage-remote-run connection add \
35-
--name "MyOAuth" \
36-
--type "ac-on-prem" \
37-
--url "$MAGE_URL" \
38-
--consumer-key "$MAGE_CONSUMER_KEY" \
39-
--consumer-secret "$MAGE_CONSUMER_SECRET" \
40-
--access-token "$MAGE_ACCESS_TOKEN" \
41-
--token-secret "$MAGE_ACCESS_TOKEN_SECRET" \
42-
--active \
43-
--no-test
37+
- name: List Websites
38+
run: mage-remote-run website list --format json
4439

45-
- name: Test Connection
46-
# This step will fail if the credentials above are invalid
47-
# We continue on error just to show the workflow completing for demo purposes
48-
continue-on-error: true
49-
run: mage-remote-run connection test
40+
- name: List Store Groups
41+
run: mage-remote-run store group list --format json

0 commit comments

Comments
 (0)