|
| 1 | +on: [push] |
| 2 | +permissions: |
| 3 | + contents: write |
| 4 | + issues: write |
| 5 | +name: Create GitHub issues |
| 6 | +jobs: |
| 7 | + next_steps: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + |
| 12 | +{%- if AddCitation %} |
| 13 | + - name: Create citation data issue |
| 14 | + uses: JasonEtco/create-an-issue@v2 |
| 15 | + env: |
| 16 | + GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }} |
| 17 | + with: |
| 18 | + filename: .github/workflows/next_steps_citation_issue.md |
| 19 | + id: citation |
| 20 | + - name: List created issues |
| 21 | + run: | |
| 22 | + echo "Created issues that must be completed to have fully working Python package: |
| 23 | + * Citation data {{ '${{' }} steps.citation.outputs.url {{ '}}' }}" |
| 24 | + - name: Cleanup files needed to create next steps issues |
| 25 | + run: | |
| 26 | + git config --global user.name 'NLeSC Python template' |
| 27 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 28 | + git pull # other next step workflows may push changes before |
| 29 | + git rm .github/workflows/next_steps_citation_issue.md |
| 30 | + git commit -am "Cleanup automated next steps issue generator for citation" |
| 31 | + git push |
| 32 | +{%- endif %} |
| 33 | + |
| 34 | +{%- if AddLinting %} |
| 35 | + - name: Create linting issue |
| 36 | + uses: JasonEtco/create-an-issue@v2 |
| 37 | + env: |
| 38 | + GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }} |
| 39 | + with: |
| 40 | + filename: .github/workflows/next_steps_linting_issue.md |
| 41 | + id: linting |
| 42 | + - name: List created issues |
| 43 | + run: | |
| 44 | + echo "Created issues that must be completed to have fully working Python package: |
| 45 | + * Linting fixes {{ '${{' }} steps.linting.outputs.url {{ '}}' }}" |
| 46 | + - name: Cleanup files needed to create next steps issues |
| 47 | + run: | |
| 48 | + git config --global user.name 'NLeSC Python template' |
| 49 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 50 | + git pull # other next step workflows may push changes before |
| 51 | + git rm .github/workflows/next_steps_linting_issue.md |
| 52 | + git commit -am "Cleanup automated next steps issue generator" |
| 53 | + git push |
| 54 | +{%- endif %} |
| 55 | + |
| 56 | +{%- if AddOnlineDocumentation %} |
| 57 | + - name: Create online documentation issue |
| 58 | + uses: JasonEtco/create-an-issue@v2 |
| 59 | + env: |
| 60 | + GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }} |
| 61 | + with: |
| 62 | + filename: .github/workflows/next_steps_online_documentation_issue.md |
| 63 | + id: readthedocs |
| 64 | + - name: List created issues |
| 65 | + run: | |
| 66 | + echo "Created issues that must be completed to have fully working Python package: |
| 67 | + * Read the Docs instructions {{ '${{' }} steps.readthedocs.outputs.url {{ '}}' }}" |
| 68 | + - name: Cleanup files needed to create next steps issues |
| 69 | + run: | |
| 70 | + git config --global user.name 'NLeSC Python template' |
| 71 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 72 | + git pull # other next step workflows may push changes before |
| 73 | + git rm .github/workflows/next_steps_online_documentation_issue.md |
| 74 | + git commit -am "Cleanup automated next steps issue generator for online documentation" |
| 75 | + git push |
| 76 | +{%- endif %} |
| 77 | + |
| 78 | +{%- if AddZenodo %} |
| 79 | + - name: Create Zenodo integration issue |
| 80 | + uses: JasonEtco/create-an-issue@v2 |
| 81 | + env: |
| 82 | + GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }} |
| 83 | + with: |
| 84 | + filename: .github/workflows/next_steps_zenodo_issue.md |
| 85 | + id: zenodo |
| 86 | + - name: List created issues |
| 87 | + run: | |
| 88 | + echo "Created issues that must be completed to have fully working Python package: |
| 89 | + * Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}" |
| 90 | + - name: Cleanup files needed to create next steps issues |
| 91 | + run: | |
| 92 | + git config --global user.name 'NLeSC Python template' |
| 93 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 94 | + git pull # other next step workflows may push changes before |
| 95 | + git rm .github/workflows/next_steps_zenodo_issue.md |
| 96 | + git commit -am "Cleanup automated next steps issue generator for zenodo" |
| 97 | + git push |
| 98 | +{%- endif %} |
| 99 | + |
| 100 | +{%- if AddSonarCloud %} |
| 101 | + - name: Create Sonarcloud issue |
| 102 | + uses: JasonEtco/create-an-issue@v2 |
| 103 | + env: |
| 104 | + GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }} |
| 105 | + with: |
| 106 | + filename: .github/workflows/next_steps_sonarcloud_issue.md |
| 107 | + id: sonarcloud |
| 108 | + - name: List created issues |
| 109 | + run: | |
| 110 | + echo "Created issues that must be completed to have fully working Python package: |
| 111 | + * Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}" |
| 112 | + - name: Cleanup files needed to create next steps issues |
| 113 | + run: | |
| 114 | + git config --global user.name 'NLeSC Python template' |
| 115 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 116 | + git pull # other next step workflows may push changes before |
| 117 | + git rm .github/workflows/next_steps_sonarcloud_issue.md |
| 118 | + git commit -am "Cleanup automated next steps issue generator for sonarcloud" |
| 119 | + git push |
| 120 | +{%- endif %} |
| 121 | + |
| 122 | +{%- if AddCitation or AddLinting or AddOnlineDocumentation or AddZenodo or AddSonarCloud %} |
| 123 | + - name: Cleanup files needed to create next steps issues |
| 124 | + run: | |
| 125 | + git config --global user.name 'NLeSC Python template' |
| 126 | + git config --global user.email 'nlesc-python-template@users.noreply.github.com' |
| 127 | + git pull # other next step workflows may push changes before |
| 128 | + git rm .github/workflows/next_steps.yml |
| 129 | + git commit -am "Cleanup automated next steps issue generator" |
| 130 | + git push |
| 131 | +{%- endif %} |
0 commit comments