Manage documentation tasks for GitHub Epics #11455
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manage documentation tasks for GitHub Epics | |
| on: | |
| schedule: # Every 15 minutes | |
| - cron: '*/15 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| manage-docs: | |
| if: github.repository == 'shopware/shopware' && github.ref == 'refs/heads/trunk' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write | |
| issues: read | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 4 | |
| - id: sts | |
| continue-on-error: true | |
| uses: shopware/octo-sts-action@main | |
| with: | |
| scope: shopware | |
| identity: ManageProjects | |
| - shell: bash | |
| run: npm ci --prefix .github/bin/js/ | |
| - uses: actions/github-script@5c56fde4671bc2d3592fb0f2c5b5bab9ddae03b1 # 7 | |
| env: | |
| JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }} | |
| JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
| REPO_VARS: ${{ toJSON(vars) }} | |
| with: | |
| github-token: ${{ steps.sts.outputs.token }} | |
| script: | | |
| const { createDocumentationTasksForProjects } = await import('${{ github.workspace }}/.github/bin/js/node_modules/@shopware-ag/gh-project-automation/dist/index.mjs') | |
| const repoVars = JSON.parse(process.env.REPO_VARS); | |
| const docTaskProjects = repoVars.DOC_TASK_PROJECTS.split(',').map(i => parseInt(i)); | |
| const docTaskProjectId = parseInt(repoVars.DOC_TASK_PROJECT_ID); | |
| const docTaskDescription = repoVars.DOC_TASK_DESCRIPTION; | |
| const docTaskReferenceCommentPrefix = repoVars.DOC_TASK_REFERENCE_COMMENT_PREFIX; | |
| await createDocumentationTasksForProjects( | |
| {github, core, context, fetch}, | |
| docTaskProjects, | |
| 'shopware', | |
| docTaskProjectId, | |
| docTaskDescription, | |
| docTaskReferenceCommentPrefix | |
| ); |