Compare commits
No commits in common. "199b28c0bd6658a7eed38bd8652d82ee3c9e5e79" and "d7056a0b455bdeb8a17f36978071f08aef9aef75" have entirely different histories.
199b28c0bd
...
d7056a0b45
2 changed files with 7 additions and 5 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
name: Lint on PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
@ -15,16 +17,16 @@ jobs:
|
||||||
- name: Get modified YAML files
|
- name: Get modified YAML files
|
||||||
id: get_changed_files
|
id: get_changed_files
|
||||||
run: |
|
run: |
|
||||||
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD | grep -E '\.(yml)$' || true)
|
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(yml)$' || true)
|
||||||
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
|
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Run yamllint on modified files
|
- name: Run yamllint on modified files
|
||||||
if: env.CHANGED_FILES != ''
|
if: env.CHANGED_FILES != ''
|
||||||
run: |
|
run: |
|
||||||
yamllint $CHANGED_FILES
|
yamllint $CHANGED_FILES
|
||||||
env:
|
env:
|
||||||
CHANGED_FILES: ${{ env.CHANGED_FILES }}
|
CHANGED_FILES: ${{ env.CHANGED_FILES }}
|
||||||
|
|
||||||
- name: Skip linting if no YAML files are changed
|
- name: Skip linting if no YAML files are changed
|
||||||
if: env.CHANGED_FILES == ''
|
if: env.CHANGED_FILES == ''
|
||||||
run: echo "No YAML files changed in this PR. Skipping lint."
|
run: echo "No YAML files changed in this PR. Skipping lint."
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: codeberg.org/forgejo/forgejo:9.0.3
|
image: codeberg.org/forgejo/forgejo:9.0.2
|
||||||
container_name: forgejo
|
container_name: forgejo
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
|
|
Loading…
Reference in a new issue