Skip to content

Commit

Permalink
add label
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain committed Jan 14, 2025
1 parent 842f2b4 commit aecdeca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docs-preview-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
cleanup:
runs-on: ubuntu-latest
# Only run this job if the PR has the 'docs-preview' label,
# which is added by the Preview Build workflow.
if: contains(github.event.pull_request.labels.*.name, 'docs-preview')
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/docs-preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,14 @@ jobs:
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.
pr_number: ${{ env.PR_NUMBER }}
comment_tag: "eg-preview"

# Add the 'docs-preview' label to the PR
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: ${{ env.PR_NUMBER }},
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['docs-preview']
})

0 comments on commit aecdeca

Please sign in to comment.