decided to use python. just a test #27
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: | |
uild-and-publish: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: test | |
run: | | |
python ./utils/python/parse_json.py ./plugin_requirements.json | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get current commit ID | |
run: echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Get previous commit ID | |
run: | | |
PREV_COMMIT_ID=$(git rev-list --max-parents=0 HEAD | head -n 1) | |
echo "PREV_COMMIT_ID=$PREV_COMMIT_ID" >> $GITHUB_ENV | |
- name: Check if requirements have changed | |
id: check_changes | |
run: | | |
# Überprüfen Sie, ob sich plugin_requirements.yml geändert hat | |
dif= | |
echo $dif | |
CHANGED=$(git diff HEAD 'plugin_requirements.yml') | |
if [ -z "$CHANGED" ]; then | |
else | |
echo "CHANGED=false" >> $GITHUB_ENV | |
fi | |
# - 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 }} |