Skip to content

chore(deps): update dependency knope to v0.13.4 #22

chore(deps): update dependency knope to v0.13.4

chore(deps): update dependency knope to v0.13.4 #22

Workflow file for this run

name: brew test-bot
on:
push:
pull_request:
jobs:
update-sha:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Download Knope Source
run: curl -o source.tgz https://codeload.github.com/knope-dev/knope/tar.gz/refs/tags/v0.13.0
- name: Get new SHA
run: echo "NEW_SHA=$(shasum -a 256 source.tgz | cut -d ' ' -f 1)" >> $GITHUB_ENV
- name: Update Formula
id: update-formula
run: sed -i "s#^ sha256 .*# sha256 \"${{ env.NEW_SHA }}\"#" Formula/knope.rb
- name: Check if SHA changed
id: check-sha
run: echo "changed=$(git diff --exit-code Formula/knope.rb > /dev/null && echo no || echo yes)" >> $GITHUB_OUTPUT
- name: Commit back new SHA if it changed
if: steps.check-if-sha-changed.outputs.changed == 'yes'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add Formula/knope.rb
git commit -m "Update SHA to ${{ env.NEW_SHA }}"
git push
- name: Save formula as artifact
uses: actions/upload-artifact@v3
with:
name: formula
path: Formula/knope.rb
test-forumla-and-build-bottles:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
needs:
- update-sha
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Replace Formula with updated version
uses: actions/download-artifact@v2
with:
name: formula
path: Formula
- run: brew test-bot --only-cleanup-before
- run: brew test-bot --only-setup
- run: brew test-bot --only-tap-syntax
- run: brew test-bot --only-formulae
if: github.event_name == 'pull_request'
- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: bottles
path: '*.bottle.*'