do not run release
job on pr
#316
Workflow file for this run
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: Ansible Molecule | |
on: # yamllint disable-line rule:truthy | |
push: | |
tags-ignore: | |
- '*' | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
schedule: | |
- cron: '15 8 8 * *' | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Run ansible-lint | |
uses: ansible/ansible-lint@v6 | |
test: | |
needs: | |
- lint | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
scenario: | |
- default | |
distros: | |
- debian11 | |
- debian12 | |
- fedora35 | |
- fedora36 | |
- ubuntu2004 | |
- ubuntu2204 | |
releases: | |
- stable | |
- beta | |
versions: | |
- "1.67.0" | |
- "" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: "${{ github.repository }}" | |
- name: Workaround Git Security Warning | |
run: | | |
# Workaround a bug in github actions: | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: molecule | |
uses: robertdebock/[email protected] | |
env: | |
MOLECULE_DISTRO: "${{ matrix.distros }}" | |
TEST_RELEASE: "${{ matrix.releases }}" | |
TEST_VERSION: "${{ matrix.versions }}" | |
with: | |
scenario: ${{ matrix.scenario }} | |
test-archlinux: | |
needs: | |
- lint | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
scenario: | |
- archlinux | |
distros: | |
- archlinux | |
releases: | |
- stable | |
- beta | |
versions: | |
- "1.67.0" | |
- "" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: "${{ github.repository }}" | |
- name: Workaround Git Security Warning | |
run: | | |
# Workaround a bug in github actions: | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: molecule | |
uses: robertdebock/[email protected] | |
env: | |
MOLECULE_DISTRO: "${{ matrix.distros }}" | |
TEST_RELEASE: "${{ matrix.releases }}" | |
TEST_VERSION: "${{ matrix.versions }}" | |
with: | |
scenario: ${{ matrix.scenario }} | |
release: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- test | |
- test-archlinux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Release to ansible galaxy | |
uses: robertdebock/[email protected] | |
with: | |
galaxy_api_key: ${{ secrets.galaxy_api_key }} | |
git_branch: main |