Skip to content

Commit

Permalink
run npm ci before migrating
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg committed Dec 19, 2023
1 parent 88fcd2d commit 879d5c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41720,6 +41720,7 @@ const inputs_helper_1 = __nccwpck_require__(6188);
const nx_version_1 = __nccwpck_require__(692);
const git_1 = __nccwpck_require__(6350);
const nx_migrate_1 = __nccwpck_require__(8796);
const exec_1 = __nccwpck_require__(1514);
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
Expand Down Expand Up @@ -41752,6 +41753,8 @@ function run() {
core.debug('Setting up git user, origin and branch...');
const origin = `https://x-access-token:${inputs.repoToken}@github.com/${github.context.repo.owner}/${github.context.repo.repo}`;
yield (0, git_1.prepareGit)(origin, branchName);
core.debug('Installing deps...');
yield (0, exec_1.exec)('npm ci');
core.debug('Starting migrations...');
yield (0, nx_migrate_1.migrate)(inputs.includeMigrationsFile, inputs.legacyPeerDeps);
core.debug('Pushing changes...');
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {getInputs} from './inputs-helper'
import {getCurrentNxVersion, getLatestNxVersion} from './nx-version'
import {makePRBody, prepareGit, pushChangesToRemote} from './git'
import {migrate} from './nx-migrate'
import {exec} from '@actions/exec'

async function run(): Promise<void> {
try {
Expand Down Expand Up @@ -55,6 +56,9 @@ async function run(): Promise<void> {
const origin = `https://x-access-token:${inputs.repoToken}@github.com/${github.context.repo.owner}/${github.context.repo.repo}`
await prepareGit(origin, branchName)

core.debug('Installing deps...')
await exec('npm ci')

core.debug('Starting migrations...')
await migrate(inputs.includeMigrationsFile, inputs.legacyPeerDeps)

Expand Down

0 comments on commit 879d5c9

Please sign in to comment.