Code Monkey home page Code Monkey logo

action-homebrew-bump-formula's Introduction

Homebrew bump formula GitHub Action

An action that wraps brew bump-formula-pr to ease the process of updating the formula on new project releases.

Works on Ubuntu and macOS runners.

Usage

One should use the Personal Access Token for token input to this Action, not the default GITHUB_TOKEN, because brew bump-formula-pr creates a fork of the formula's tap repository (if needed) and then creates a pull request.

There are two ways to use this Action.

Standard mode

Use if you want to simply bump the formula, when a new release happens.

Listen for new tags in workflow:

on:
  # trigger when release got created (preferred)
  release:
    types: [released]
  # trigger on tag push
  # push:
  #   tags:
  #     - "*"

The Action will extract all needed informations by itself, you just need to specify the following step in your workflow:

- name: Update Homebrew formula
  uses: dawidd6/action-homebrew-bump-formula@v3
  with:
    # Required, custom GitHub access token with the 'public_repo' and 'workflow' scopes
    token: ${{secrets.TOKEN}}
    # Optional, will commit with this user name
    user_name: name
    # Optional, will commit with this user email
    user_email: [email protected]
    # Optional, will create tap repo fork in organization
    org: ORG
    # Optional, use the origin repository instead of forking
    no_fork: false
    # Optional, defaults to homebrew/core
    tap: USER/REPO
    # Formula name, required
    formula: FORMULA
    # Optional, will be determined automatically
    tag: ${{github.ref}}
    # Optional, will be determined automatically
    revision: ${{github.sha}}
    # Optional, if don't want to check for already open PRs
    force: false # true

Livecheck mode

If livecheck input is set to true, the Action will run brew livecheck to check if any provided formulae are outdated or if tap contains any outdated formulae and then will run brew bump-formula-pr on each of those formulae with proper arguments to bump them.

Might be a good idea to run this on schedule in your tap repo, so one gets automated PRs updating outdated formulae.

If there are no outdated formulae, the Action will just exit.

- name: Update Homebrew formula
  uses: dawidd6/action-homebrew-bump-formula@v3
  with:
    # Required, custom personal GitHub access token with only the 'public_repo' scope enabled
    token: ${{secrets.CUSTOM_PERSONAL_ACCESS_TOKEN}}
    # Optional, will commit with this user name
    user_name: user_name
    # Optional, will commit with this user email
    user_email: [email protected]
    # Optional, will create tap repo fork in organization
    org: ORG
    # Bump all outdated formulae in this tap
    tap: USER/REPO
    # Bump only these formulae if outdated
    formula: FORMULA-1, FORMULA-2, FORMULA-3, ...
    # Optional, if don't want to check for already open PRs
    force: false # true
    # Need to set this input if want to use `brew livecheck`
    livecheck: true

If only tap input is provided, all formulae in given tap will be checked and bumped if needed.

Examples

action-homebrew-bump-formula's People

Contributors

5ouma avatar chenrui333 avatar dawidd6 avatar ddelange avatar dependabot-preview[bot] avatar fauxpark avatar iloveitaly avatar jasonkarns avatar jfoster avatar spacewander avatar

Watchers

 avatar  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.