Last active
January 11, 2022 16:26
-
-
Save duncanmalashock/8d92c2e618abd606e14b51a24cbdbd19 to your computer and use it in GitHub Desktop.
GitHub Action config for removing unused code
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
# .github/workflows/cleanup.yml | |
# Runs the elm-review command on a regular basis and opens a PR removing unused code | |
name: Cleanup | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
schedule: | |
# Run at midnight UTC, every Sunday | |
- cron: "0 0 * * 0" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- run: npx install | |
- run: yes | elm-review --fix-all | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: "Remove unused code" | |
title: "Remove unused code using elm-review" | |
body: | | |
Auto-generated by the Cleanup 🧹 GitHub Action. | |
branch: elm-review-cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment