Skip to content

Commit

Permalink
Reuseable Ansible steps (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: nolte <nolte07@googlemail.com>
  • Loading branch information
nolte and nolte authored Jan 29, 2022
1 parent ae3a740 commit b44f788
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 10 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/reuseable-ansible-galaxy-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publishing Ansible Galaxy Role

on:
workflow_call:
secrets:
galaxy_api_key:
required: true

jobs:
molecule:
name: "Push Role"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2.4.0

- name: galaxy
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
25 changes: 25 additions & 0 deletions .github/workflows/reuseable-ansible-molecule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release Deliver Docs

on:
workflow_call:
inputs:
molecule_working_dir:
description: 'The Molecule Working Directory'
type: string
molecule_args:
description: 'Molecule Extra Arguments'
type: string

jobs:
molecule:
name: "Ansible Molecule Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v2.4.0

- name: Start ansible molecule Based Tests
uses: gofrolist/molecule-action@v2.2.12
with:
molecule_working_dir: ${{ inputs.molecule_working_dir }}
molecule_args: ${{ inputs.molecule_args }}
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ Used for deduplicate the CI/CD Boilerplate-Code. Like [Workflow](https://docs.gi
## Workflows

<!--td-workflows-start-->
| Workflow | description |
|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ```reuseable-automerge.yaml``` | Using [pascalgn/automerge-action](https://github.com/pascalgn/automerge-action) for better Merge Request handling. |
| ```reuseable-mkdocs.yaml``` | Publish a [mkdocs](https://www.mkdocs.org/) based Documentation as [Github Page](https://pages.github.com/). |
| ```reuseable-pre-commit.yaml``` | Call [pre-commit](https://pre-commit.com/) for a minimal static tests set, like liter etc. |
| ```reuseable-release-cd-refresh-master.yml``` | Refresh the current master branch, with the Revision from the Latest published Release, so the master/main branch will be present the `latest` Released version. |
| ```reuseable-release-drafter.yml``` | Will be use [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) for updating the current "Draft" Release with a Changelog. |
| ```reuseable-sphinx.yaml``` | Build and Publish a [Sphinx](https://www.sphinx-doc.org/en/master) Documentation as [Github Page](https://pages.github.com/). |
| ```reuseable-stale.yaml``` | Mark old or inactive issues and close then, used [actions/stale](https://github.com/actions/stale) for this work. |
| ```reuseable-trivy.yaml``` | Scan the GitRepo by using [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action). |
| Workflow | description |
|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ```reuseable-ansible-galaxy-push.yaml``` | Using [robertdebock/galaxy-action](https://github.com/robertdebock/galaxy-action) for publish a Ansible Role to [Ansible Galxy](https://galaxy.ansible.com/). |
| ```reuseable-ansible-molecule.yaml``` | Start a simple Molecule test run by using the [gofrolist/molecule-action](https://github.com/gofrolist/molecule-action) action. |
| ```reuseable-automerge.yaml``` | Using [pascalgn/automerge-action](https://github.com/pascalgn/automerge-action) for better Merge Request handling. |
| ```reuseable-mkdocs.yaml``` | Publish a [mkdocs](https://www.mkdocs.org/) based Documentation as [Github Page](https://pages.github.com/). |
| ```reuseable-pre-commit.yaml``` | Call [pre-commit](https://pre-commit.com/) for a minimal static tests set, like liter etc. |
| ```reuseable-release-cd-refresh-master.yml``` | Refresh the current master branch, with the Revision from the Latest published Release, so the master/main branch will be present the `latest` Released version. |
| ```reuseable-release-drafter.yml``` | Will be use [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) for updating the current "Draft" Release with a Changelog. |
| ```reuseable-sphinx.yaml``` | Build and Publish a [Sphinx](https://www.sphinx-doc.org/en/master) Documentation as [Github Page](https://pages.github.com/). |
| ```reuseable-stale.yaml``` | Mark old or inactive issues and close then, used [actions/stale](https://github.com/actions/stale) for this work. |
| ```reuseable-trivy.yaml``` | Scan the GitRepo by using [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action). |
<!--td-workflows-end-->

## Probot Config
Expand Down

0 comments on commit b44f788

Please sign in to comment.