Skip to content

Commit 5f3b6cf

Browse files
committed
ci: create release on workflow_dispatch
1 parent 9d4ac1d commit 5f3b6cf

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed
Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,61 @@
11
name: Publish to Ansible Galaxy
22

33
on:
4-
release:
5-
types: published
4+
push:
65
workflow_dispatch:
76

87
jobs:
98
publish:
109
environment: publish
1110
runs-on: ubuntu-latest
11+
outputs:
12+
version: ${{ steps.build.outputs.version }}
1213

1314
steps:
1415
- name: Checkout code
1516
uses: actions/checkout@v4
1617

1718
- name: Build
18-
run: ansible-galaxy collection build
19+
id: build
20+
run: |
21+
OUTPUT=$(ansible-galaxy collection build)
22+
echo "$OUTPUT"
23+
COLLECTION_PATH=$(echo "$OUTPUT" | grep -o '/[^ ]*\.tar\.gz')
24+
VERSION=$(echo "$COLLECTION_PATH" | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+\.tar\.gz' | sed 's/\.tar\.gz//')
25+
echo "collection_path=$COLLECTION_PATH" >> $GITHUB_OUTPUT
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
27+
echo "Collection path: $COLLECTION_PATH"
28+
echo "Collection version: $VERSION"
1929
20-
- name: Publish to Ansible Galaxy
21-
run: ansible-galaxy collection publish *.tar.gz --api-key ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
30+
- run: |
31+
echo "${{ steps.build.outputs.collection_path }}"
2232
23-
- name: Upload Artifact
24-
uses: actions/[email protected]
25-
with:
26-
name: ansible-dvls-collection
27-
path: '*.tar.gz'
33+
# - name: Publish to Ansible Galaxy
34+
# run: ansible-galaxy collection publish ${{ steps.build.outputs.collection_path }} --api-key ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
35+
36+
# - name: Upload Artifact
37+
# uses: actions/[email protected]
38+
# with:
39+
# name: ansible-dvls-collection
40+
# path: ${{ steps.build.outputs.collection_path }}
41+
42+
create-release:
43+
name: Create release
44+
runs-on: ubuntu-latest
45+
needs: publish
46+
47+
steps:
48+
- run: |
49+
echo "${{ needs.publish.outputs.version }}"
50+
51+
# - name: Check out ${{ github.repository }}
52+
# uses: actions/checkout@v4
53+
# with:
54+
# fetch-depth: 0 # fetch all tags for the set version step
55+
56+
# - name: Create release
57+
# id: create-release
58+
# uses: devolutions/actions/create-release@v1
59+
# with:
60+
# github_token: ${{ secrets.GITHUB_TOKEN }}
61+
# tag: v${{ needs.publish.outputs.version }}

galaxy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
namespace: devolutions
22
name: dvls
3-
version: 1.1.1
3+
version: 1.2.1
44
readme: README.md
55
authors:
66
- Danny Bédard <[email protected]>
7-
description: This Ansible module allows you to authenticate with DVLS and fetch server information, vaults and secrets by name or ID.
8-
license: MIT
7+
description: >
8+
Ansible collection for interacting with Devolutions Server (DVLS). It provides modules for authentication,
9+
retrieving server information and vaults, and performing create, read and update operations on secrets.
10+
Enables automation of common Devolutions Password Server tasks within Ansible workflows.
911
license_file: ''
1012
tags: [dvls, secrets, devolutions, password]
1113
dependencies: {}

0 commit comments

Comments
 (0)