Skip to content

Build Ansible Collection #20

Build Ansible Collection

Build Ansible Collection #20

---
name: Build Collection
on:
workflow_dispatch:
inputs:
runs-on:
type: string
required: false
default: ghr-deploy-configure-rke-cicd
environment-name:
type: string
required: true
default: k8s
jobs:
Build-Collection:
name: Build Ansible Collection
uses: stuttgart-things/stuttgart-things/.github/workflows/ansible-collection.yaml@main
with:
runs-on: ${{ inputs.runs-on }}
environment-name: ${{ inputs.environment-name }}
continue-error: false
Create-Git-Tag:
name: Create-Git-Tag
needs: Build-Collection
uses: stuttgart-things/stuttgart-things/.github/workflows/git-tag.yaml@main
with:
runs-on: ${{ inputs.runs-on }}
environment-name: ${{ inputs.environment-name }}
tag-name: ${{ needs.Build-Collection.outputs.collection-version }}
continue-error: false
Release-Collection:
name: Release-Collection
needs: Create-Git-Tag
permissions:
contents: write
pull-requests: write
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.environment-name }}
container:
image: eu.gcr.io/stuttgart-things/machineshop:v1.7.2
steps:
- name: Download collection
id: download
uses: actions/[email protected]
with:
name: ${{ needs.Build-Collection.outputs.artifact-name }}
- name: Release module
uses: ncipollo/[email protected]
with:
name: ${{ needs.Build-Collection.outputs.artifact-name }}
artifacts: ${{ needs.Build-Collection.outputs.artifact-name }}
body: "ansible-collection"
tag: 1.2.4 ${{ needs.Build-Collection.outputs.collection-version }}