Skip to content

Commit

Permalink
Merge pull request #105 from telekom-mms/update_github
Browse files Browse the repository at this point in the history
update settings and workflows, update codespell findings
  • Loading branch information
michaelamattes authored Aug 10, 2023
2 parents 5375bca + b9bf953 commit 988345c
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 71 deletions.
14 changes: 14 additions & 0 deletions .github/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"repos": {
"description": "The Docker Management Container includes a set of plugins and services that make it easier to build, test, deploy and manage infrastructure.",
"visibility": "public",
"default_branch": "main",
"homepage": "https://telekom-mms.github.io/docker-management-container/",
"topics": [
"dmc",
"docker",
"devops",
"toolbox"
]
}
}
12 changes: 12 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
call-codespell:
uses: telekom-mms/.github/.github/workflows/codespell.yml@main
6 changes: 5 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
name: linting

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
linting:
Expand Down
80 changes: 13 additions & 67 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,19 @@
---
name: New release
name: release

on:
push:
branches:
- main
branches: [main]

jobs:
generate_changelog:
runs-on: ubuntu-latest
name: create release draft
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- 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 changelog
uses: charmixer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
future_release: ${{ steps.version.outputs.next-version }}

- name: push changelog
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'main'
commit-message: 'update changelog'
force-add: 'true'
files: CHANGELOG.md
name: T-Systems MMS
email: [email protected]
env:
TEMPLATE_REPOSITORY: telekom-mms/terraform-template

# do a second checkout to prevent race situation
# changelog gets updated but action works on old commit id
- uses: actions/[email protected]
with:
ref: main

- name: Generate changelog for the release
run: |
sed '/## \[${{ steps.previoustag.outputs.tag }}\]/Q' CHANGELOG.md > CHANGELOGRELEASE.md
- name: Read CHANGELOG.md
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./CHANGELOGRELEASE.md

- name: Create Release draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
release_name: ${{ steps.version.outputs.next-version }}
tag_name: ${{ steps.version.outputs.next-version }}
body: |
${{ steps.package.outputs.content }}
draft: true
jobs:
call-readme:
if: github.repository != '$TEMPLATE_REPOSITORY'
uses: telekom-mms/.github/.github/workflows/terraform_docs.yml@main
call-release:
if: github.repository != '$TEMPLATE_REPOSITORY'
uses: telekom-mms/.github/.github/workflows/release.yml@main
with:
files: README.md
18 changes: 18 additions & 0 deletions .github/workflows/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: settings

on:
push:
branches: [main]
schedule:
- cron: '0 10 * * *'

env:
TEMPLATE_REPOSITORY: telekom-mms/terraform-template

jobs:
call-settings:
if: github.repository != '$TEMPLATE_REPOSITORY'
uses: telekom-mms/.github/.github/workflows/github_repository.yml@main
secrets:
GH_APP_CREDENTIALS_TOKEN: ${{ secrets.GH_APP_CREDENTIALS_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- Update docker/metadata-action action to v4.6.0 [\#91](https://github.com/telekom-mms/docker-management-container/pull/91) ([renovate[bot]](https://github.com/apps/renovate))
- Update actions/checkout action to v3.5.2 [\#90](https://github.com/telekom-mms/docker-management-container/pull/90) ([renovate[bot]](https://github.com/apps/renovate))
- Update actions/checkout action to v3.5.1 [\#89](https://github.com/telekom-mms/docker-management-container/pull/89) ([renovate[bot]](https://github.com/apps/renovate))
- try to improve readabilty of templates by using indentation [\#88](https://github.com/telekom-mms/docker-management-container/pull/88) ([z-bsod](https://github.com/z-bsod))
- try to improve readability of templates by using indentation [\#88](https://github.com/telekom-mms/docker-management-container/pull/88) ([z-bsod](https://github.com/z-bsod))
- Update actions/checkout action to v3.5.0 [\#86](https://github.com/telekom-mms/docker-management-container/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
- rm table style [\#79](https://github.com/telekom-mms/docker-management-container/pull/79) ([michaelamattes](https://github.com/michaelamattes))

Expand Down
2 changes: 1 addition & 1 deletion migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BINARIES="GCLOUD_VERSION|GITHUB_BINARIES"
REQUIREMENTS="PIP_REQUIREMENTS|ANSIBLE_REQUIREMENTS"
EXTENSIONS="AZ_CLI_EXTENSIONS|HELM_EXTENSIONS"

## funtion
## function
migrate() {
## packages
SEARCH_PACKAGES=$(grep -E ${PACKAGES} "${OLD_ENV_FILE}" | sed 's/"//g' | sed 's/PACKAGES=//g')
Expand Down
2 changes: 1 addition & 1 deletion template.d/21_requirements
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## requirements
RUN if [ -n "${REQUIREMENTS}" ]; then \
### pip should alway be the first element in array
### pip should always be the first element in array
REQUIREMENTS=$(echo ${REQUIREMENTS} | awk -F 'pip;' '{print FS$NR$NF}') && \
IFS=';' && \
for REQUIREMENT in ${REQUIREMENTS[@]}; \
Expand Down

0 comments on commit 988345c

Please sign in to comment.