Skip to content

Update README.md

Update README.md #126

name: Duplicate and empty lines removal
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events for any branch
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# permission
permissions: write-all
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Run a one-line script
shell: pwsh
run: |
[System.String]$File1 = 'Microsoft Domains.txt'
[System.String]$File2 = 'Microsoft Domains - EASM.txt'
[System.String[]]$File1Content = (Get-Content -Path $File1).Trim() |
Where-Object -FilterScript { ($_.trim() -ne '') -and ($_ -match '[a-zA-Z0-9]') -and ($_ -notmatch '^xn--.*' ) } | Select-Object -Unique
$File1Content | Set-Content -Path $File1 -Force
(Get-Content -Path $File2).Trim() |
Where-Object -FilterScript { ($_.trim() -ne '') -and ($_ -match '[a-zA-Z0-9]') -and ($_ -notmatch '^xn--.*' ) -and ($_ -notin $File1Content) } |
Select-Object -Unique | Set-Content -Path $File2 -Force
git config --global user.email "spynetgirl@outlook"
git config --global user.name "HotCakeX"
git add --all
git commit -m "Automated Update"
git push