mirror of
https://github.com/codex-team/editor.js
synced 2024-06-16 12:45:29 +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:
|
check-for-no-version-changing:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
# Checkout to target branch
|
# Checkout to target branch
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -33,10 +35,14 @@ jobs:
|
||||||
|
|
||||||
# Stop workflow and do not bump version if it was changed already
|
# Stop workflow and do not bump version if it was changed already
|
||||||
- name: Stop workflow if version 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
|
if: steps.packageOld.outputs.version != steps.packageNew.outputs.version
|
||||||
with:
|
run: |
|
||||||
workflow_id: ${{ github.run_id }}
|
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:
|
bump-version:
|
||||||
needs: check-for-no-version-changing
|
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:
|
check-version-changing:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
@ -36,10 +38,14 @@ jobs:
|
||||||
|
|
||||||
# Stop workflow if version was not changed
|
# Stop workflow if version was not changed
|
||||||
- name: 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
|
if: steps.packageOld.outputs.version == steps.packageNew.outputs.version
|
||||||
with:
|
run: |
|
||||||
workflow_id: ${{ github.run_id }}
|
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
|
# Create a new draft release
|
||||||
release-draft:
|
release-draft:
|
||||||
|
|
Loading…
Reference in a new issue