Skip to content

Create a new branch and pull request if a new Liferay version is available

License

Notifications You must be signed in to change notification settings

lgdd/liferay-upgrade-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liferay Upgrade Action

lgdd/liferay-upgrade-action@v2 create a new branch and pull request if a new Liferay version is available.

This action uses another action you might find useful: https://github.com/lgdd/get-liferay-info-action

Requirements

This action create a branch, push changes and create a pull request. So make sure to give proper permissions to GitHub Actions in your repository:

  • Go to Settings > Actions > General > Workflow Permissions
  • Select Read and write permissions
  • Check Allow GitHub Actions to create and approve pull requests

More information in GitHub Actions documentation.

Usage

You can use this action in a GitHub Actions Workflow by a adding a YAML file under .github/workflows/ with the following content:

name: liferay-auto-upgrade
run-name: Liferay Auto Upgrade

on:
  schedule:
    # https://crontab.guru/every-monday
    - cron: '0 0 * * MON'

permissions:
  contents: write
  pull-requests: write

jobs:
  liferay-upgrade:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: lgdd/liferay-upgrade-action@v2
        with:
          java-distribution: 'zulu'
          java-version: '11'

In this example we run the every monday to follow Liferay weekly release schedule. Of course, you can change the frequency as well as the event list you want this action to be triggered by.

More information about Github Actions Events.

v2

In v1, the checkout step was done by default inside that action. Even if you could disable it with an input, it doesn't feel like a good practice to include that in a custom action.

So In v2 you need to add the checkout step first:

steps:
+     - uses: actions/checkout@v3
      - uses: lgdd/liferay-upgrade-action@v2
        with:
          java-distribution: 'zulu'
          java-version: '11'

If you were already using the checkout action in v1, you can now remove the input in v2:

steps:
      - uses: actions/checkout@v3
      - uses: lgdd/liferay-upgrade-action@v2
        with:
          java-distribution: 'zulu'
          java-version: '11'
-         checkout: false

License

MIT

About

Create a new branch and pull request if a new Liferay version is available

Resources

License

Stars

Watchers

Forks

Languages