mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
Make a request to github api instead of using composite action (#2558)
This commit is contained in:
parent
5515c3b534
commit
ea2be754e7
12
.github/workflows/bump-version-on-merge-next.yml
vendored
12
.github/workflows/bump-version-on-merge-next.yml
vendored
|
@ -11,6 +11,8 @@ jobs:
|
|||
check-for-no-version-changing:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
# Checkout to target branch
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -33,10 +35,14 @@ jobs:
|
|||
|
||||
# Stop workflow and do not bump version if it was changed already
|
||||
- name: Stop workflow if version was changed already
|
||||
uses: styfle/cancel-workflow-action@0.12.0
|
||||
if: steps.packageOld.outputs.version != steps.packageNew.outputs.version
|
||||
with:
|
||||
workflow_id: ${{ github.run_id }}
|
||||
run: |
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel
|
||||
|
||||
bump-version:
|
||||
needs: check-for-no-version-changing
|
||||
|
|
12
.github/workflows/create-a-release-draft.yml
vendored
12
.github/workflows/create-a-release-draft.yml
vendored
|
@ -11,6 +11,8 @@ jobs:
|
|||
check-version-changing:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
|
@ -36,10 +38,14 @@ jobs:
|
|||
|
||||
# Stop workflow if version was not changed
|
||||
- name: Stop workflow if version was not changed
|
||||
uses: styfle/cancel-workflow-action@0.12.0
|
||||
if: steps.packageOld.outputs.version == steps.packageNew.outputs.version
|
||||
with:
|
||||
workflow_id: ${{ github.run_id }}
|
||||
run: |
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel
|
||||
|
||||
# Create a new draft release
|
||||
release-draft:
|
||||
|
|
Loading…
Reference in a new issue