#SPDX-License-Identifier: GPL-3.0-only --- name: Molecule Tests on: schedule: - cron: '0 7 * * 1' # Every Monday at 07:00 UTC workflow_dispatch: pull_request: branches: - main jobs: molecule-tests: runs-on: fedora-latest steps: - name: Add ~/.local/bin to PATH run: echo "$HOME/.local/bin" >> "$GITEA_PATH" - name: Checkout uses: actions/checkout@v6 with: path: ansible_role_mail - name: Install Molecule run: pip install ansible molecule molecule-plugins[podman] - name: Install Ansible collections run: ansible-galaxy collection install containers.podman - name: Run Molecule tests working-directory: ansible_role_mail run: molecule test - name: Tag latest if: github.ref == 'refs/heads/main' working-directory: ansible_role_mail run: | git config user.name "giabot" git config user.email "bot@mail.gianet.us" git remote set-url origin "https://giabot:${{ secrets.GITEA_TOKEN }}@gianet.us/engineering/ansible_role_mail.git" git tag -f latest git push -f origin latest