terraform: update file .gitignore #53
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
# terraform managed | |
--- | |
# Inspired on robertdebock (https://github.com/robertdebock) publish workflow | |
name: Release main or releases to Ansible Galaxy | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [created, edited, published, released] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
# allows molecule colors to be passed to GitHub Actions | |
PY_COLORS: 1 | |
# allows ansible colors to be passed to GitHub Actions | |
ANSIBLE_FORCE_COLOR: 1 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
cache-dependency-path: | | |
deploy_requirements.txt | |
- name: Install dependencies | |
run: | | |
pip3 install --upgrade pip | |
pip3 install -r deploy_requirements.txt | |
- name: Publish role to galaxy | |
run: | | |
# repository is name/repo turn into -> name<SPACE>repo | |
ansible-galaxy role import --api-key ${{secrets.ANSIBLE_GALAXY_API_KEY}} $(echo "${{ github.repository }}" | sed 's!/! !g') |