mirror of
https://github.com/kewlfft/ansible-aur.git
synced 2025-09-17 00:20:38 +03:00
Update galaxy.yml
revert override
This commit is contained in:
109
galaxy.yml
109
galaxy.yml
@@ -1,59 +1,70 @@
|
|||||||
name: Build and Publish Collection to Ansible Galaxy
|
### REQUIRED
|
||||||
|
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
|
||||||
|
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
|
||||||
|
# underscores or numbers and cannot contain consecutive underscores
|
||||||
|
namespace: kewlfft
|
||||||
|
|
||||||
on:
|
# The name of the collection. Has the same character restrictions as 'namespace'
|
||||||
release:
|
name: aur
|
||||||
types: [published]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
defaults:
|
# The version of the collection. Must be compatible with semantic versioning
|
||||||
run:
|
version: 0.12.1
|
||||||
working-directory: collections/ansible_collections/kewlfft/aur
|
|
||||||
|
|
||||||
jobs:
|
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||||
release:
|
readme: README.md
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
path: collections/ansible_collections/kewlfft/aur
|
|
||||||
|
|
||||||
- name: Debug workflow version
|
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
|
||||||
run: echo "=== RUNNING UPDATED WORKFLOW ==="
|
# @nicks:irc/im.site#channel'
|
||||||
|
authors:
|
||||||
|
- kewl fft <kewl@alto.eu.org>
|
||||||
|
|
||||||
- name: Verify version in galaxy.yml matches release tag
|
|
||||||
run: |
|
|
||||||
tag_version="${GITHUB_REF##*/}" # e.g., v0.12.2
|
|
||||||
tag_version="${tag_version#v}" # strip leading 'v' if present
|
|
||||||
file_version=$(awk '/^version:/ {print $2}' galaxy.yml)
|
|
||||||
|
|
||||||
if [ "${GITHUB_EVENT_NAME}" != "workflow_dispatch" ] && [ "$file_version" != "$tag_version" ]; then
|
### OPTIONAL but strongly recommended
|
||||||
echo "❌ galaxy.yml version ($file_version) does not match tag ($tag_version)"
|
# A short summary description of the collection
|
||||||
exit 1
|
description: This collection includes an Ansible module to manage packages from the AUR.
|
||||||
fi
|
|
||||||
echo "✅ Version check passed: $file_version"
|
|
||||||
|
|
||||||
- name: Build collection
|
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
|
||||||
run: |
|
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
|
||||||
path=$(ansible-galaxy collection build | awk '/Created collection/ {print $NF}')
|
license:
|
||||||
echo "TARBALL=$path" >> $GITHUB_ENV
|
- GPL-3.0-or-later
|
||||||
echo "📦 Built collection at $path"
|
|
||||||
|
|
||||||
- name: Upload built collection artifact
|
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
|
||||||
uses: actions/upload-artifact@v4
|
# mutually exclusive with 'license'
|
||||||
with:
|
license_file: ''
|
||||||
name: ansible-collection-tarball
|
|
||||||
path: ${{ env.TARBALL }}
|
|
||||||
|
|
||||||
- name: Debug tarball before publish
|
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
|
||||||
run: |
|
# requirements as 'namespace' and 'name'
|
||||||
echo "🔎 Checking tarball path..."
|
tags:
|
||||||
echo "TARBALL=$TARBALL"
|
- aur
|
||||||
ls -l "$(dirname "$TARBALL")"
|
- arch_user_repository
|
||||||
|
- arch
|
||||||
|
- archlinux
|
||||||
|
- arch_linux
|
||||||
|
- packaging
|
||||||
|
- software
|
||||||
|
|
||||||
- name: Publish collection
|
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
|
||||||
if: github.event_name != 'workflow_dispatch' # skip publish for manual testing
|
# collection label 'namespace.name'. The value is a version range
|
||||||
run: |
|
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
|
||||||
echo "📤 Publishing $TARBALL ..."
|
# range specifiers can be set and are separated by ','
|
||||||
ansible-galaxy collection publish "$TARBALL" \
|
dependencies: {}
|
||||||
--api-key "${{ secrets.ANSIBLE_GALAXY_API_KEY }}"
|
|
||||||
|
# The URL of the originating SCM repository
|
||||||
|
repository: https://github.com/kewlfft/ansible-aur
|
||||||
|
|
||||||
|
# The URL to any online docs
|
||||||
|
documentation: https://github.com/kewlfft/ansible-aur/blob/master/README.md
|
||||||
|
|
||||||
|
# The URL to the homepage of the collection/project
|
||||||
|
homepage: https://github.com/kewlfft/ansible-aur
|
||||||
|
|
||||||
|
# The URL to the collection issue tracker
|
||||||
|
issues: https://github.com/kewlfft/ansible-aur/issues
|
||||||
|
|
||||||
|
# A list of file glob-like patterns used to filter any files or directories that should not be included in the build
|
||||||
|
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This
|
||||||
|
# uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry',
|
||||||
|
# and '.git' are always filtered
|
||||||
|
build_ignore:
|
||||||
|
- .github
|
||||||
|
- .gitignore
|
||||||
|
Reference in New Issue
Block a user