Skip to content

Commit

Permalink
fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobenchimol committed Nov 17, 2024
1 parent c3979dc commit 6294a2a
Showing 1 changed file with 4 additions and 42 deletions.
46 changes: 4 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,8 @@ defaults:

jobs:

molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
include:
# - distro: centos8
# playbook: converge-issue-certificate.yml
# experimental: false
- distro: rockylinux9
playbook: converge.yml
experimental: false

steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'brunobenchimol.certbot_dns'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible molecule molecule-plugins[docker] docker

- name: Run Molecule tests.
run: molecule test
continue-on-error: ${{ matrix.experimental }}
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
MOLECULE_PLAYBOOK: ${{ matrix.playbook }}
CERTBOT_DNS_API_TOKEN: ${{ secrets.CERTBOT_DNS_API_TOKEN }}
CERTBOT_DNS_API_EMAIL: ${{ secrets.CERTBOT_DNS_API_EMAIL }}

release:
name: Release on Galaxy
needs:
- molecule
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
Expand All @@ -72,8 +32,10 @@ jobs:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-base ansible-core
run: pip3 install ansible-core

# Alternative: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

0 comments on commit 6294a2a

Please sign in to comment.