Skip to content

Commit

Permalink
workflow to sync tokens with mistica-web mistica-ios and mistica-andr…
Browse files Browse the repository at this point in the history
…oid repos (#1508)
  • Loading branch information
atabel authored Oct 16, 2023
1 parent 82e126e commit 786f701
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/sync-design-tokens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Sync design tokens
on:
workflow_dispatch:
inputs:
ref:
description: 'mistica-design repo changeset or branch'
required: false
default: 'production'
draft:
type: boolean
description: 'Create a draft PR'
required: false
default: false

jobs:
sync-design-tokens:
runs-on: ubuntu-latest
steps:
# https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event
- name: Trigger mistica-web repo workflow
run: |
curl -L \
-X POST \
-H "Authorization: Bearer ${{ secrets.FLOW_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/telefonica/mistica-web/actions/workflows/import-design-tokens.yml/dispatches \
--data '{"ref": "pre-production", "inputs": {"draft": ${{github.event.inputs.draft}}, "ref": "${{github.event.inputs.ref}}"}}'
- name: Trigger mistica-ios repo workflow
run: |
curl -L \
-X POST \
-H "Authorization: Bearer ${{ secrets.FLOW_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/telefonica/mistica-ios/actions/workflows/generate-mistica-tokens.yml/dispatches \
--data '{"ref": "pre-production", "inputs": {"ref": "${{github.event.inputs.ref}}"}}'
- name: Trigger mistica-android repo workflow
run: |
curl -L \
-X POST \
-H "Authorization: Bearer ${{ secrets.FLOW_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/telefonica/mistica-android/actions/workflows/import-design-tokens.yml/dispatches \
--data '{"ref": "pre-production", "inputs": {"ref": "${{github.event.inputs.ref}}"}}'

0 comments on commit 786f701

Please sign in to comment.