Files
hassio-addons/.github/workflows/weekly_crlftolf.yaml
dependabot[bot] 99a55c2109 chore(deps): bump actions/checkout from 5.1.0 to 7.0.1 (#2913)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.1.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5.1.0...v7.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 21:34:56 +02:00

57 lines
1.7 KiB
YAML

# yamllint disable rule:line-length
---
# This workflow finds and fixes CRLF endings in a repository
name: Fix CRLF Endings
on:
workflow_call:
workflow_dispatch:
jobs:
crlf-to-lf:
if: github.repository_owner == 'alexbelgium'
runs-on: ubuntu-latest
steps:
- name: Checkout repository contents
uses: actions/checkout@v7.0.1
- name: Use action to check for CRLF endings
uses: erclu/check-crlf@v1
- name: Commit if needed
uses: EndBug/add-and-commit@v10
with:
message: "Github bot : CRLF corrected"
default_author: github_actions
fix-crlf:
name: Fix CRLF Endings
if: github.repository_owner == 'alexbelgium'
runs-on: ubuntu-latest # Use a Linux runner
steps:
- name: Checkout repository contents
uses: actions/checkout@v7.0.1 # Use the checkout action
- name: Find files with CRLF endings
uses: erclu/check-crlf@v1.2.0 # Use the check-crlf action
id: check-crlf # Assign an id to this step
with:
# Specify the paths to check
path: |
./*
!.git
!*.png
!*.jpg
!*.bin
- name: Apply dos2unix to files with CRLF endings
run: |
# Loop through each file and apply dos2unix
# shellcheck disable=SC2043
for f in ${{ steps.check-crlf.outputs.files }}; do
# Apply dos2unix and keep the original timestamp
dos2unix -k "$f"
done
- name: Commit if needed
uses: EndBug/add-and-commit@v10
with:
message: "Github bot : CRLF corrected"
default_author: github_actions