Files
hassio-addons/.github/workflows/weekly_crlftolf.yaml
dependabot[bot] 315fefd9e6 Bump peter-evans/create-pull-request from 3 to 5
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 18:28:54 +00:00

42 lines
1.4 KiB
YAML

# yamllint disable rule:line-length
---
# This workflow finds and fixes CRLF endings in a repository
name: Fix CRLF Endings
on:
push: # Trigger the workflow on push event
workflow_dispatch:
jobs:
fix-crlf:
name: Fix CRLF Endings
runs-on: ubuntu-latest # Use a Linux runner
steps:
- name: Checkout repository contents
uses: actions/checkout@v2 # 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
for f in ${{ steps.check-crlf.outputs.files }}; do
# Apply dos2unix and keep the original timestamp
dos2unix -k "$f"
done
- name: Create a pull request with the fixed files
uses: peter-evans/create-pull-request@v5 # Use the create-pull-request action
with:
# Specify the pull request details
title: Fix CRLF Endings
commit-message: Apply dos2unix to files with CRLF endings
branch: fix-crlf-endings
delete-branch: true