Skip to content

Commit

Permalink
Merge pull request #363 from PoligonSa/dev
Browse files Browse the repository at this point in the history
Release 2024_03_21
  • Loading branch information
Yakutoc authored Mar 21, 2024
2 parents 6dc0f35 + dc76d46 commit be6648d
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 9 deletions.
74 changes: 65 additions & 9 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,78 @@
name: POC Trigger Target Workflow
name: POC Trigger workflow

on:
workflow_dispatch:
release:
types: [ published ]
workflow_run:
workflows: [ "Sharing data" ]
branches: [ dev ]
types:
- completed

jobs:
trigger:
get:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout to Plasma Web
uses: actions/checkout@v4
with:
show-progress: false

- name: Dump GitHub context
- name: Dumb
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
DATA: ${{ toJSON(github.event) }}
run: |
echo "$DATA"
- name: Get release info
run: |
echo "${{ github.event.workflow_run.head_commit.message }}"
generate:
runs-on: ubuntu-latest
if: ${{ fromJSON(false) }}
outputs:
url: ${{ steps.android-icons.outputs.artifact-url }}
steps:
- name: Checkout to Plasma Web
uses: actions/checkout@v4
with:
repository: salute-developers/plasma
ref: ${{ fromJSON(github.event.client_payload).ref || 'dev' }}
show-progress: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Bootstrap web
run: npm ci

- name: Generate android icons
run: |
echo "$GITHUB_CONTEXT"
npx lerna bootstrap --ignore-scripts --scope="@salutejs/plasma-icons"
npm run generate:android --prefix="packages/plasma-icons"
- name: Save android icons
id: android-icons
uses: actions/[email protected]
with:
name: android-icons-${{ fromJSON(github.event.client_payload).ref || 'dev' }}.zip
path: packages/plasma-icons/archives/android-icons.zip

download:
needs: [generate]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false

- name: Download android icons
uses: actions/[email protected]
with:
name: android-icons.zip


16 changes: 16 additions & 0 deletions .github/workflows/subscribe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Subscribe to custom event

on:
repository_dispatch:
types: [plasma-released]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
env:
DATA: ${{ toJSON(github.event.client_payload) }}
run: |
echo "$DATA"

0 comments on commit be6648d

Please sign in to comment.