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.

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 and creates a PR.

It is best to use this Action when a new tag is pushed:

on:
  push:
    tags:
      - '*'

Example of bumping any formula in any user tap:

- name: Get tag
  id: tag
  uses: dawidd6/action-get-tag@v1

- name: Update Homebrew formula
  uses: dawidd6/action-homebrew-bump-formula@v1
  with:
    token: ${{secrets.GITHUB_PAT}}
    formula: USER/REPO/FORMULA
    url: "https://github.com/USER/REPO/archive/${{steps.tag.outputs.tag}}.tar.gz"

Example of bumping lazygit formula in Homebrew/homebrew-core tap:

- name: Get tag
  id: tag
  uses: dawidd6/action-get-tag@v1

- name: Update Homebrew formula
  uses: dawidd6/action-homebrew-bump-formula@v1
  with:
    token: ${{secrets.GITHUB_PAT}}
    formula: lazygit
    url: "https://github.com/jesseduffield/lazygit/archive/${{steps.tag.outputs.tag}}.tar.gz"

... using url input because the formula already specifies it:

class Lazygit < Formula
  desc "Simple terminal UI for git commands"
  homepage "https://github.com/jesseduffield/lazygit/"
  url "https://github.com/jesseduffield/lazygit/archive/v0.16.2.tar.gz"
  sha256 "76c043e59afc403d7353cdb188ac6850ce4c4125412e291240c787b0187e71c6"

Example of bumping lazydocker formula in Homebrew/homebrew-core tap:

- name: Get tag
  id: tag
  uses: dawidd6/action-get-tag@v1

- name: Update Homebrew formula
  uses: dawidd6/action-homebrew-bump-formula@v1
  with:
    token: ${{secrets.GITHUB_PAT}}
    formula: lazydocker
    tag: ${{steps.tag.outputs.tag}}
    revision: ${{github.sha}}

... using tag and revision inputs because the formula already specifies them:

class Lazydocker < Formula
  desc "The lazier way to manage everything docker"
  homepage "https://github.com/jesseduffield/lazydocker"
  url "https://github.com/jesseduffield/lazydocker.git",
      :tag      => "v0.8",
      :revision => "cea67bc570daaa757a886813ff3c2763189efef6"

action-homebrew-bump-formula's People

Contributors

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