This repository was archived by the owner on Dec 18, 2024. It is now read-only.
Housekeeping tasks #48
This file contains hidden or 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: "Housekeeping tasks" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" # https://crontab.guru/ | |
jobs: | |
deps: | |
runs-on: "ubuntu-latest" | |
env: | |
DATABASE_URL: postgres://postgres:@localhost:4211/postgres | |
permissions: | |
contents: "write" | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Start dev service containers | |
run: docker compose up --detach | |
- name: Set up Node.js environment | |
uses: textbook/take-action@nodejs | |
with: | |
checkout: "false" | |
node-version-file: ".nvmrc" | |
- name: Prepare git config for commit | |
run: | | |
git config --global user.name 'gh-actions' | |
git config --global user.email '[email protected]' | |
- name: Apply and test in-range dependency updates | |
run: ./bin/up-to-date.sh | |
env: | |
CYPRESS_VIDEO: true | |
FORCE_COLOR: true | |
LOG_LEVEL: debug | |
OAUTH_CLIENT_ID: unused | |
OAUTH_CLIENT_SECRET: unused | |
SESSION_SECRET: correct-horse-battery-staple | |
SUDO_TOKEN: make-me-a-sandwich | |
- name: Get service logs and stop containers | |
if: always() | |
run: | | |
docker compose logs | |
docker compose down | |
- name: Store Cypress test outputs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: ignore | |
name: cypress-outputs | |
path: | | |
e2e/screenshots/ | |
e2e/videos/ | |
prune: | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: "read" | |
pull-requests: "write" | |
steps: | |
- uses: "actions/checkout@v4" | |
- run: "./bin/close-stale.sh" | |
env: | |
GH_TOKEN: ${{ github.token }} |