Skip to content

add --if-exists flag to migrate command #208

add --if-exists flag to migrate command

add --if-exists flag to migrate command #208

Workflow file for this run

name: 'build-test'
concurrency: 'build-test'
on:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run all
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: | # prepare test environment
cd ..
mkdir temp
mv ./nx-migration-gh-action/* ./temp
mv ./temp/test-setup/* ./nx-migration-gh-action
mv ./temp/dist ./nx-migration-gh-action/dist
mv ./temp/action.yml ./nx-migration-gh-action
cd ./nx-migration-gh-action
npm i
- uses: ./
id: nx_migrate
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
includeMigrationsFile: false
- run: 'echo "PR ID Output: ${{ steps.nx_migrate.outputs.prId }}"'
- name: Cleanup
if: steps.nx_migrate.outputs.prId
run: gh pr close --delete-branch "${{ steps.nx_migrate.outputs.prId }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}