diff --git a/.github/workflows/project-automation.yaml b/.github/workflows/project-automation.yaml new file mode 100644 index 0000000..2d14996 --- /dev/null +++ b/.github/workflows/project-automation.yaml @@ -0,0 +1,66 @@ +name: Add new issues to the Relevant Boards + +on: + workflow_call: + secrets: + app-client-id: + required: true + app-client-key: + required: true + token: + required: true +jobs: + add-to-project-board: + name: Add issue to project + if: | + github.repository != 'FlowFuse/website' && + github.repository != 'FlowFuse/node-red-dashboard' + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 + with: + client-id: ${{ secrets.app-client-id }} + private-key: ${{ secrets.app-client-key }} + owner: ${{ github.repository_owner }} + - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 + with: + project-url: https://github.com/orgs/FlowFuse/projects/3 + github-token: ${{ steps.generate_token.outputs.token }} + + add-to-artwork-board: + name: Add art requests to the Artwork board + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 + with: + client-id: ${{ secrets.app-client-id }} + private-key: ${{ secrets.app-client-key }} + owner: ${{ github.repository_owner }} + - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 + with: + labeled: design, artwork + label-operator: AND + project-url: https://github.com/orgs/FlowFuse/projects/10 + github-token: ${{ steps.generate_token.outputs.token }} + + add-to-dashboard-backlog: + name: Add issues to the Dashboard Backlog project board + if: github.repository == 'FlowFuse/node-red-dashboard' + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 + with: + client-id: ${{ secrets.app-client-id }} + private-key: ${{ secrets.app-client-key }} + owner: ${{ github.repository_owner }} + - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 + with: + labeled: needs-triage + project-url: https://github.com/orgs/FlowFuse/projects/15 + github-token: ${{ secrets.token }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2489ce0..6cc2f79 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,6 +31,7 @@ jobs: - { name: npm_test, path: actions/npm_test } - { name: scan_container_image, path: actions/scan_container_image } - { name: update-nr-flows, path: actions/update-nr-flows } + - { name: project-automation, path: .github/workflows/project-automation.yaml } steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: