Skip to content

Commit e409658

Browse files
committed
fix ci
1 parent c6f5af9 commit e409658

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
on: [push, pull_request]
1+
on:
2+
workflow_run:
3+
workflows: ["Lint YAML and Auto-commit Fixes"]
4+
types:
5+
- completed
6+
27
name: Ansible Lint
38

49
permissions:
@@ -7,12 +12,16 @@ permissions:
712
jobs:
813
build:
914
runs-on: ubuntu-latest
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1016
steps:
1117
- name: Harden Runner
1218
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
1319
with:
1420
egress-policy: audit
1521

1622
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
ref: ${{ github.event.workflow_run.head_branch }}
25+
repository: ${{ github.event.workflow_run.head_repository.full_name }}
1726
- name: Lint Ansible Playbook
1827
uses: ansible/ansible-lint@main

.github/workflows/lint-yaml.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Lint YAML and Auto-commit Fixes
22
on:
33
pull_request:
44
branches: [main]
5-
jobs:
5+
push:
6+
branches: ['**']
67
lint-and-fix:
78
name: Lint YAML and Auto-commit Fixes
89
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)