fixed update_version.sh #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Ansible Galaxy Collection | |
on: | |
push: | |
branches: | |
- main # Ändern Sie dies entsprechend Ihrem Hauptbranch | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install ansible[galaxy] | |
- name: Update version in collection.yml | |
run: sh ../utils/bash/update_version.sh ../galaxy.yml | |
- name: Build collection | |
run: ansible-galaxy collection build -vvv --output-path . --requirements-file requirements.txt --force | |
env: | |
ANSIBLE_GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} # Stellen Sie sicher, dass GALAXY_API_KEY in Ihren Secrets gesetzt ist | |
- name: Publish collection | |
run: ansible-galaxy collection publish --api-key ${{ secrets.GALAXY_API_KEY }} ./ji_podhead-ilohelper-*.tar.gz | |
env: | |
ANSIBLE_GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} |