Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Ansible Release # feel free to pick your own name

on:
push:
branches:
- main
paths:
- 'galaxy.yml'

jobs:
build:
runs-on: ubuntu-latest
steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v2

- name: building collection
run: ./build_collection.sh
shell: bash

- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::Version_$(grep -oP '^version: \K.*' ./galaxy.yml)"

- name: Relase new version
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: ./releases/*.tar.gz
...
3 changes: 2 additions & 1 deletion build_collection.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash

ansible-galaxy collection build

ansible-galaxy collection build --output-path ./releases
2 changes: 1 addition & 1 deletion publish_collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ if [ $# -ne 1 ]; then
echo "usage: ${0} <file.tar.gz>"
exit 1
fi
ansible-galaxy collection publish ${1} -s inbound-redhat_cop
ansible-galaxy collection publish ./releases/${1} -s inbound-redhat_cop
rm -rf ${1}