Skip to content

Commit

Permalink
feat: Attach label to PR auto
Browse files Browse the repository at this point in the history
  • Loading branch information
atsuyaw committed Oct 22, 2024
1 parent e30b46e commit 00f41c7
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
name: Release

"on": ["create"]
"on":
create:
pull_request:
types: [opened,synchronize]

Check failure on line 6 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:20 [commas] too few spaces after comma

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ github.token }}

jobs:
openPR:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: tj-actions/changed-files@v40
id: updCont
with:
files:
- "content/**"
- "data/**"
- uses: tj-actions/changed-files@v40
id: updSrc
with:
files:
- ".github/**"
- "./**"
- "layout/**"
- "static/**"
- name: Create PR
if: {{ github.event_name != create }}

Check failure on line 32 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

32:15 [braces] too many spaces inside braces

Check failure on line 32 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

32:43 [braces] too many spaces inside braces
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr create \
--base "main" \
--head "${{ github.ref_name }}" \
--title "Release/${{ github.ref_name }}" \
--body "" \
--draft
- name: Mark as post
if: {{ steps.updCont.outputs.any_changed }}

Check failure on line 43 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

43:15 [braces] too many spaces inside braces

Check failure on line 43 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

43:49 [braces] too many spaces inside braces
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr edit --add-label "create post"
- name: Mark as dev
if: {{ steps.updSrc.outputs.any_changed }}

Check failure on line 49 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

49:15 [braces] too many spaces inside braces

Check failure on line 49 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yamllint

49:48 [braces] too many spaces inside braces
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr edit --add-label "development"

0 comments on commit 00f41c7

Please sign in to comment.