From d8e7e246babc1eb9914cd2f03637fefd9e349505 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 19 Sep 2024 19:08:52 +0100 Subject: [PATCH] ci: Use centralized 'Add to docs project' workflow with GitHub App auth (#14181) Signed-off-by: Jack Baldry --- .github/issue_commands.json | 10 ---------- .github/workflows/add-to-docs-project.yml | 15 +++++++++++++++ .github/workflows/issue_commands.yml | 21 --------------------- 3 files changed, 15 insertions(+), 31 deletions(-) delete mode 100644 .github/issue_commands.json create mode 100644 .github/workflows/add-to-docs-project.yml delete mode 100644 .github/workflows/issue_commands.yml diff --git a/.github/issue_commands.json b/.github/issue_commands.json deleted file mode 100644 index a1f4ec2178719..0000000000000 --- a/.github/issue_commands.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "type": "label", - "name": "type/docs", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/69" - } - } -] diff --git a/.github/workflows/add-to-docs-project.yml b/.github/workflows/add-to-docs-project.yml new file mode 100644 index 0000000000000..56f57ed9badf4 --- /dev/null +++ b/.github/workflows/add-to-docs-project.yml @@ -0,0 +1,15 @@ +name: Add to docs project +on: + issues: + types: [labeled] + pull_request: + types: [labeled] +jobs: + main: + if: ${{ github.event.label.name == 'type/docs' }} + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: grafana/writers-toolkit/add-to-docs-project@add-to-docs-project/v1 diff --git a/.github/workflows/issue_commands.yml b/.github/workflows/issue_commands.yml deleted file mode 100644 index cfab551c4207c..0000000000000 --- a/.github/workflows/issue_commands.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Run commands when issues are labeled -on: - issues: - types: [labeled] -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Commands - uses: ./actions/commands - with: - token: ${{secrets.ISSUE_COMMANDS_TOKEN}} - configPath: issue_commands