Skip to content

Commit d42a827

Browse files
authored
Do not run Molecule CI/CD workflow when creating a new release (#45)
1 parent b2a5046 commit d42a827

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/galaxy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
name: Ansible Galaxy import
33
on:
4-
push:
5-
tags:
6-
- '*'
4+
release:
75
jobs:
86
galaxy:
97
name: Galaxy
@@ -15,7 +13,7 @@ jobs:
1513
- name: Set up Python 3
1614
uses: actions/setup-python@v2
1715
with:
18-
python-version: '3.x'
16+
python-version: 3.x
1917

2018
- name: Install Ansible
2119
run: pip3 install ansible-base==2.10.3

.github/workflows/molecule.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
name: Molecule CI/CD
33
on:
44
pull_request:
5+
branches:
6+
- main
57
push:
68
branches:
79
- main
10+
ignore-tags:
11+
- "*"
812
schedule:
913
- cron: "0 0 1 * *"
1014
jobs:
@@ -23,22 +27,22 @@ jobs:
2327
- name: Set up Python 3
2428
uses: actions/setup-python@v2
2529
with:
26-
python-version: '3.x'
30+
python-version: 3.x
2731

2832
- name: Install Molecule dependencies
2933
run: |
3034
pip3 install ansible-base==2.10.3
3135
pip3 install ansible==2.10.3
3236
pip3 install ansible-lint==4.3.7
3337
pip3 install yamllint==1.25.0
34-
pip3 install 'molecule[docker]'==3.2.1
38+
pip3 install "molecule[docker]"==3.2.1
3539
pip3 install docker==4.4.0
3640
3741
- name: Run Molecule tests
3842
run: molecule test -s ${{ matrix.scenario }}
39-
if: contains(${{ matrix.scenario }}, 'plus') && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
43+
if: contains(${{ matrix.scenario }}, "plus") && !(github.event_name == "pull_request" && github.event.pull_request.head.repo.fork)
4044
env:
41-
PY_COLORS: '1'
42-
ANSIBLE_FORCE_COLOR: '1'
45+
PY_COLORS: "1"
46+
ANSIBLE_FORCE_COLOR: "1"
4347
NGINX_CRT: ${{ secrets.NGINX_CRT }}
4448
NGINX_KEY: ${{ secrets.NGINX_KEY }}

0 commit comments

Comments
 (0)