Check ESLint Rules Outdated #553
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Check ESLint Rules Outdated' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * *' | |
jobs: | |
check: | |
name: Check Outdated | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- | |
name: Install PNPM | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
- | |
name: Test | |
run: | | |
sed -i 's#\("eslint": \)".*"#\1"8.x"#' ./packages/eslint-config/package.json | |
sed -i 's#\("@typescript-eslint/eslint-plugin": \)".*"#\1"6.x"#' ./packages/eslint-config/package.json | |
sed -i 's#\("@typescript-eslint/parser": \)".*"#\1"6.x"#' ./packages/eslint-config/package.json | |
sed -i 's#\("eslint-config-prettier": \)".*"#\1"9.x"#' ./packages/eslint-config/package.json | |
pnpm install --no-frozen-lockfile | |
pnpm run --filter=@ttionya/prettier-config build | |
pnpm run --filter=@ttionya/eslint-config check | |
- | |
name: Get Content | |
run: | | |
EOF="$(dd if=/dev/urandom bs=15 count=1 status=none | base64)" | |
echo "message<<${EOF}" >> $GITHUB_ENV | |
pnpm run --filter=@ttionya/eslint-config check:unexpected | tail -n +5 >> $GITHUB_ENV | |
echo "${EOF}" >> $GITHUB_ENV | |
- | |
name: Create Issue | |
uses: JasonEtco/create-an-issue@v2 | |
if: ${{ env.message }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MESSAGE: ${{ env.message }} | |
with: | |
filename: .github/CHECK_ISSUE_TEMPLATE.md | |
update_existing: true |