diff --git a/.github/workflows/gh-projects.yml b/.github/workflows/gh-projects.yml new file mode 100644 index 0000000..2d2ee7e --- /dev/null +++ b/.github/workflows/gh-projects.yml @@ -0,0 +1,33 @@ +name: gh-projects + +on: + issues: + types: + - opened + pull_request: + types: + - opened + +permissions: + issues: write + pull-requests: write + contents: read + +jobs: + NIDAP-projects: + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ vars.CCBR_BOT_APP_ID }} + private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }} + owner: NIDAP-Community + + - name: add to NIDAP SCWorkflow project + uses: actions/add-to-project@v1.0.2 + if: github.event_name == 'issues' + with: + project-url: https://github.com/orgs/NIDAP-Community/projects/6 + github-token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/user-projects.yml b/.github/workflows/user-projects.yml new file mode 100644 index 0000000..c189ef6 --- /dev/null +++ b/.github/workflows/user-projects.yml @@ -0,0 +1,23 @@ +name: user-projects + +on: + issues: + types: + - assigned + pull_request: + types: + - assigned + +permissions: + issues: write + pull-requests: write + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - uses: CCBR/actions/user-projects@main + with: + app-id: ${{ vars.CCBR_BOT_APP_ID }} + app-private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }} + token-owner: "CCBR"