Skip to content

publish 'in productie' en 'in ontwikkeling' user stories #4893

publish 'in productie' en 'in ontwikkeling' user stories

publish 'in productie' en 'in ontwikkeling' user stories #4893

name: publish 'in productie' en 'in ontwikkeling' user stories
on:
schedule:
- cron: '0 9,11,12,14,16,17 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create User Stories IO
run: |
echo -e '---\nlayout: page-with-side-nav\ntitle: User Stories in Ontwikkeling\n---\n' >> user-stories-dev.md
echo -e '# User stories\n' >> user-stories-dev.md
- name: List 'v2.1' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v2.1" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
cat issues-tmp.md >> user-stories-dev.md
echo -e '\n' >> user-stories-dev.md
- name: Create User Stories Prod
run: |
echo -e '---\nlayout: page-with-side-nav\ntitle: User Stories in Productie\n---\n' >> user-stories-prod.md
echo -e '# User stories\n' >> user-stories-prod.md
- name: List 'v2.0' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v2.0" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 2.0\n' >> user-stories-prod.md
echo -e 'In versie 2.0 zijn geen user stories geïmplementeerd.\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.5' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.5" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.5\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.4' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.4" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.4\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.3' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.3" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.3\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.2' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.2" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.2\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.1' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.1" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.1\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: List 'v1.0' user stories
uses: lee-dohm/[email protected]
with:
format: list
query: label:"v1.0" label:"User Story"
token: ${{ secrets.GITHUB_TOKEN }}
path: issues-tmp.md
- run: |
echo -e '## Vanaf versie 1.0\n' >> user-stories-prod.md
cat issues-tmp.md >> user-stories-prod.md
echo -e '\n' >> user-stories-prod.md
- name: target=_blank toevoegen aan issue link
run: |
sed -i 's/)$/){:target="_blank" rel="noopener"}/' user-stories-dev.md
sed -i 's/)$/){:target="_blank" rel="noopener"}/' user-stories-prod.md
- name: move user-stories markdown bestanden naar ./docs
run: |
mv user-stories-dev.md ./docs/user-stories-dev.md
mv user-stories-prod.md ./docs/user-stories-prod.md
- name: commit & push user-stories markdown bestanden
run: |
if [ -n "$(git status ./docs/user-stories-dev.md --porcelain)" ]; then
git add ./docs/user-stories-dev.md
fi
if [ -n "$(git status ./docs/user-stories-prod.md --porcelain)" ]; then
git add ./docs/user-stories-prod.md
fi
if [ -n "$(git status ./docs --porcelain)" ]; then
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git commit -m "commit user stories artifacts"
git pull --ff
git push
fi