add codeowners #213
Workflow file for this run
This file contains 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: New release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
NAMESPACE: telekom_mms | |
COLLECTION_NAME: icinga_director | |
ANSIBLE_COLLECTIONS_PATHS: ./ | |
jobs: | |
update_docs: | |
runs-on: ubuntu-latest | |
name: create documentation inside docs-folder | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
# ansible-doc-extractor requires the collection to be in a directory in | |
# the form ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/ | |
- name: Check out code to ansible collection location | |
uses: actions/[email protected] | |
with: | |
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install ansible-doc-extractor | |
run: python -m pip install ansible-doc-extractor[ansible] | |
- name: create documentation | |
run: ansible-doc-extractor docs/ plugins/inventory/* plugins/modules/* | |
- name: commit documentation | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: 'master' | |
commit-message: 'update documentation' | |
force-add: 'true' | |
files: docs/ | |
name: Telekom MMS GmbH | |
email: [email protected] | |
generate_changelog: | |
runs-on: ubuntu-latest | |
name: create release draft | |
needs: update_docs # the documentation should be updated before creating a new release | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install antsibull-changelog, antsichaut | |
run: python -m pip install antsibull-changelog antsichaut --disable-pip-version-check | |
- name: Install pandoc | |
run: sudo apt-get install pandoc | |
- name: 'Get Previous tag' | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@master" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: calculate next version | |
id: version | |
uses: patrickjahns/version-drafter-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate new version in changelog.yaml | |
run: antsibull-changelog release -v --version "${{ steps.version.outputs.next-version }}" | |
- name: Generate changelog.yaml | |
run: antsichaut | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SINCE_VERSION: "${{ steps.previoustag.outputs.tag }}" | |
- name: Update Changelog.rst | |
run: antsibull-changelog generate -v | |
- name: push changelog | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: 'master' | |
commit-message: 'update changelog' | |
force-add: 'true' | |
files: CHANGELOG.rst changelogs/ | |
name: Telekom MMS GmbH | |
email: [email protected] | |
rebase: true | |
# do a second checkout to prevent race situation | |
# changelog gets updated but action works on old commit id | |
- uses: actions/[email protected] | |
with: | |
ref: master | |
# Drafts your next Release notes as Pull Requests are merged into "master" | |
- uses: release-drafter/release-drafter@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |