From 80166d240efda689484becf77d6afe50a57cf146 Mon Sep 17 00:00:00 2001 From: snomiao Date: Mon, 20 Jan 2025 22:52:49 +0000 Subject: [PATCH] chore(publish): update workflow to include repository owner check and permissions --- .github/workflows/publish.yml | 64 +++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ab16747..dbe5ee2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,30 +1,34 @@ -name: Publish to Comfy registry -on: - workflow_dispatch: - inputs: - tag_name: - description: 'tag name' - required: true - -jobs: - publish: - name: Publish - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Publish Custom Node - uses: Comfy-Org/publish-node-action@main - with: - ## Add your own personal access token to your Github Repository secrets and reference it here. - personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ github.event.inputs.tag_name }} - release_name: v${{ github.event.inputs.tag_name }} - draft: false - prerelease: false \ No newline at end of file +name: Publish to Comfy registry +on: + workflow_dispatch: + inputs: + tag_name: + description: 'tag name' + required: true + +permissions: + issues: write + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'zombieyang' }} + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Publish Custom Node + uses: Comfy-Org/publish-node-action@v1 + with: + ## Add your own personal access token to your Github Repository secrets and reference it here. + personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.event.inputs.tag_name }} + release_name: v${{ github.event.inputs.tag_name }} + draft: false + prerelease: false