Skip to content

fix: syntax error

fix: syntax error #38

Workflow file for this run

name: Release
"on":
push:
branches-ignore:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
get-changes:
runs-on: ubuntu-22.04
outputs:
updCont: ${{ steps.updCont.outputs.any_changed }}
dev: ${{ steps.dev.outputs.any_changed }}
existPR: ${{ steps.existPR.outputs.cnt }}
steps:
- uses: actions/checkout@v4
- name: Check updCont
uses: tj-actions/changed-files@v45
id: updCont
with:
base_sha: 'main'
files: |
content/**
data/**
- name: Check dev
uses: tj-actions/changed-files@v45
id: dev
with:
base_sha: 'main'
files: |
!content/**
!data/**
- name: Check exist PR
id: existPR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "cnt=$(gh pr list -B main -H ${{ github.ref_name }} | wc -l)" \
>> $GITHUB_OUTPUT
createPR:
runs-on: ubuntu-22.04
needs:
- get-changes
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Create PR
if: needs.get-changes.outputs.existPR == 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base "main" \
--head "${{ github.ref_name }}" \
--title "${{ github.ref_name }}" \
--body "" \
--draft
- name: Mark as post
if: needs.get-changes.outputs.updCont == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit "${{ github.ref_name }}" \
--add-label "documentation"
- name: Mark as dev
if: needs.get-changes.outputs.dev == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit "${{ github.ref_name }}" \
--add-label "enhancement"