An open API service indexing awesome lists of open source software.

https://github.com/stuttgart-things/github-workflow-templates

github-workflow-templates
https://github.com/stuttgart-things/github-workflow-templates

actions cicd github-actions github-workflows reusable-components reusable-workflows

Last synced: about 1 month ago
JSON representation

github-workflow-templates

Awesome Lists containing this project

README

        

# stuttgart-things/github-workflow-templates

## REUSABLE WORKFLOW-CALLS

WORFKLOW-FOLDER

```bash
mkdir -p .github/workflows
```

TRIGGER

```yaml
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'feature/**'
- 'fix/**'
pull_request:
types: [opened, reopened]
```

GOLANG BUILD

```yaml
jobs:
validate-golang:
name: Valdiate Golang
uses: stuttgart-things/github-workflow-templates/.github/workflows/call-golang-validation.yaml@main
with:
module-name: kaeffken
environment-name: k8s
runs-on: ghr-kaeffken-skyami-cicd
golint-version: v1.61.0-alpine
golang-version: "1.23.1"
accept-linterrors: true
accept-failedtests: false
secrets: inherit
```

YAML LINT

```yaml
jobs:
yaml-lint:
name: Lint yaml files
uses: stuttgart-things/github-workflow-templates/.github/workflows/call-yaml-lint.yaml@feature/add-homerun-task-go
with:
runs-on: ghr-install-configure-docker-skyami-cicd
environment-name: k8s
continue-error: true
yamllint-version: 1
lintprofile-path: .yamllint
artifact-name: yaml-lint
```

## ACTIONS

SEND MESSAGE TO HOMERUN

```yaml
jobs:
send-to-homerun:
runs-on: ghr-stuttgart-things-skyami-cicd
steps:
- name: Send Message To Homerun
uses: stuttgart-things/github-workflow-templates/actions/send-homerun-message@main
with:
url: "https://homerun.homerun-dev.sthings-vsphere.labul.sva.de/generic"
secretToken: "${{ secrets.HOMERUN_TOKEN }}" # Pass the secret
title: "Test Homerun Title"
message: "Test Homerun Message"
severity: "INFO"
artifacts: "Test Artifact"
tags: "github,test"
assigneeName: "patrick"
assigneeAddress: ""
```

## DEV

ALL TASKS

```bash
task: Available tasks for this project:
* branch: Create branch from main
* check: Run pre-commit hooks
* commit: Commit + push code into branch
* pr: Create pull request into main
* switch-local: Switch to local branch
* switch-remote: Switch to remote branch
* tag: Tag repo
* tasks: Select a task to run
```

SELECT TASK

```bash
task=$(yq e '.tasks | keys' Taskfile.yaml | sed 's/^- //' | gum choose) && task ${task}
```

## AUTHORS

```yaml
---
authors:
- patrick.hermann
```

## LICENSE

APACHE 2.0

Copyright 2023 patrick hermann.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.