Skip to content

Run Actions on Node 22 too #8202

Run Actions on Node 22 too

Run Actions on Node 22 too #8202

Workflow file for this run

name: UMS API tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- run: yarn eslint .
- run: yarn run tsc:ci
- run: yarn test
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
git_push_flags: "--force"
ci_branch_name: main
git_remote_url: ${{ secrets.DOKKU_GIT_REMOTE }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}