Maintain Project #69
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: Maintain Project | |
on: | |
schedule: | |
- cron: 5 0 1 * * | |
workflow_dispatch: null | |
env: | |
NODE_VERSION: 20.x | |
jobs: | |
maintain-project: | |
name: Maintain Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Find yarn cache | |
id: find-yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: git checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{secrets.MAINTAIN_GITHUB_TOKEN}} | |
- name: Configure git credentials | |
uses: OleksiyRudenko/gha-git-credentials@v2 | |
with: | |
token: ${{secrets.MAINTAIN_GITHUB_TOKEN}} | |
- name: Cache yarn dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{steps.find-yarn-cache.outputs.dir}} | |
key: ${{runner.os}}-node${{env.NODE_VERSION}}-yarn-${{hashFiles('**/yarn.lock')}} | |
restore-keys: ${{runner.os}}-node${{env.NODE_VERSION}}-yarn-${{hashFiles('**/yarn.lock')}} | |
- name: Set up Node.js v${{env.NODE_VERSION}} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- run: yarn | |
- run: yarn maintain-project | |
- run: git push |