Skip to content

ci: name dispatch step #15

ci: name dispatch step

ci: name dispatch step #15

Workflow file for this run

name: Dispatch Test Worfklow
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
Dispatch:
permissions: write-all
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check release status
id: release-status
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install python-semantic-release
if semantic-release --noop --strict version
then
echo "Should release new version."
else
echo "Should not release."
fi
- uses: actions/github-script@v6
name: Dispatch CI
id: dispatch-tests
if: steps.release-status.outputs.released == 'true'
with:
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'matteo4diani',
repo: 'poetry-semantic-release-test',
workflow_id: 'test.yml',
ref: 'main'
})