Skip to content

Workflow file for this run

name: POC Trigger workflow
on:
workflow_dispatch:
inputs:
ref:
default: 'master'
description: ''
required: false
version:
description: 'Version plasma-icons package'
required: true
release:
types: [published]
jobs:
dispatch-manual:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Dispatch custom event
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/PoligonSa/plasma-sandbox/dispatches \
-d "{\"event_type\":\"build-icons\",\"client_payload\":{\"version\":\"${{github.event.inputs.version}}\", \"ref\": \"${{github.event.inputs.ref}}\"}}"
dispatch-published:
if: ${{ contains(github.event.release.name, 'plasmax-hope@') }}
runs-on: ubuntu-latest
steps:
- name: Get package version
run: |
echo "VERSION=$(echo "${{ github.event.release.tag_name }}" | cut -d '@' -f 2)" >> "$GITHUB_ENV"
- name: Dumb
env:
DATA: ${{ toJSON(github) }}
run: |
echo "$DATA"
- name: Dispatch custom event
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/PoligonSa/plasma-sandbox/dispatches \
-d "{\"event_type\":\"build-icons\",\"client_payload\":{\"version\":\"$VERSION\", \"ref\": \"dev\"}}"