Skip to content

Commit

Permalink
github: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Dec 27, 2023
1 parent 32e13e1 commit 7185272
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: ubuntu-latest
permissions:
contents: write
packages: none
pull-requests: write
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand All @@ -19,6 +23,8 @@ jobs:
- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: brew test-bot
on:
push:
branches: master
branches:
- master
pull_request:
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
Expand All @@ -18,16 +19,12 @@ jobs:

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
uses: actions/cache@v3
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: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup
Expand All @@ -39,7 +36,7 @@ jobs:

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v3
with:
name: bottles
path: '*.bottle.*'

0 comments on commit 7185272

Please sign in to comment.