diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000..01468db --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,32 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: 'Cleanup' + +on: + schedule: + - cron: '0 0/6 * * *' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: ci + run: npm ci + + - name: cleanup + run: npm run cleanup + env: + GSHEET_CLIENT_EMAIL: ${{ secrets.GSHEET_CLIENT_EMAIL }} + GSHEET_PRIVATE_KEY: ${{ secrets.GSHEET_PRIVATE_KEY }} + TEST_SPREADSHEET_ID: ${{ secrets.TEST_SPREADSHEET_ID }} diff --git a/package.json b/package.json index 2a2c7b1..acc08ba 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,8 @@ "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme --multi", "test": "nyc mocha \"test/**/*.test.ts\"", "semantic-release": "semantic-release", - "prepare": "husky install" + "prepare": "husky install", + "cleanup": "bin/clear-testsheet.sh" }, "types": "lib/index.d.ts" }