Coder Social home page Coder Social logo

la-we / nx-migration-gh-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timonmasberg/nx-migration-gh-action

0.0 0.0 0.0 2.05 MB

Automatically applies migrations, updates dependencies and opens a PR on new versions of NX

Home Page: https://github.com/marketplace/actions/nx-migration-action

License: MIT License

JavaScript 2.68% TypeScript 97.32%

nx-migration-gh-action's Introduction

NX Migration Action

This Action checks for new versions of NX based on your version of nxfound in the package.json. If a new version exists, it automatically runs nx migrate latest, installs all dependencies, applies all migrations and finally opens a pull request.

Usage

The easiest way is to check for new versions with a scheduled workflow. Make sure to checkout the branch you want apply the migrations in case there is a new version of NX. The Action will create commits for the applied migrations.

For a detailed description of all parameters check the action.yml.

name: Check for new NX version

on:
  schedule:
    - cron: "0 0 * * *" # every day at midnight

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
    - run: npm ci
    - uses: timonmasberg/[email protected]
      with:
        repoToken: ${{ secrets.GITHUB_TOKEN }}
        # Optional:
        prTitle: 'Migrates NX to $VERSION'
        includeMigrationsFile: false # `migrations.json` will not be included in this PR.
        base: 'dev'

You can also use this action in other workflow events.

Make sure you have set the necessary workflow permissions:

  • Read and write permissions
  • Allow GitHub Actions to create and approve Pull Requests

Contribute

As I have done this mostly just to fit our needs over at Kordis and Cartesius.io, this might lack some features or does not cover some edge cases. Also tests are currently rare ;)
I highly appreciate any contribution.

Make sure to run npm run all before pushing and to check-in the dist folder if you make changes in src.

nx-migration-gh-action's People

Contributors

timonmasberg avatar dependabot[bot] avatar la-we avatar karadnik-flutterint avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.