Skip to content

Commit

Permalink
Add workflow and steps to validate for and publishing to Ansible Gala…
Browse files Browse the repository at this point in the history
…xy (#230)

Signed-off-by: Webster Mudge <[email protected]>
  • Loading branch information
wmudge authored May 21, 2024
1 parent 0c6b85b commit a5c6416
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/publish_galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Publish to Ansible Galaxy

on:
release:
types: [published]

jobs:
galaxy_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Publish collection to Ansible Galaxy
uses: ansible/[email protected]
with:
api_key: "${{ secrets.GALAXY_API_KEY }}"
9 changes: 8 additions & 1 deletion .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
# Copyright 2024 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -81,3 +81,10 @@ jobs:
with:
name: pr_number
path: pr/

import-galaxy:
needs: validate
permissions:
contents: read
name: Import collection with Galaxy importer
uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main

0 comments on commit a5c6416

Please sign in to comment.