From d33e5e5ba81531f6a6655b047d439f4180a84ea9 Mon Sep 17 00:00:00 2001 From: mahiki Date: Mon, 22 Jul 2024 23:40:58 +0200 Subject: [PATCH] GHA workflows are getting worked over here --- .github/workflows/publish.yml | 4 +-- .github/workflows/tests.yml | 52 +++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4b6da0a..0932c98 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: 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 + run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" - name: Push commits uses: Homebrew/actions/git-try-push@master @@ -32,4 +32,4 @@ jobs: if: github.event.pull_request.head.repo.fork == false env: BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin $BRANCH + run: git push --delete origin "$BRANCH" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc6636d..c095226 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,9 +1,13 @@ name: brew test-bot + on: push: branches: - main pull_request: + branches: + - '**' + jobs: test-bot: strategy: @@ -11,34 +15,34 @@ jobs: os: [macos-latest] runs-on: ${{ matrix.os }} steps: - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master - - name: Cache Homebrew Bundler RubyGems - id: cache - uses: actions/cache@v1 - 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: 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: Install Homebrew Bundler RubyGems - if: steps.cache.outputs.cache-hit != 'true' - run: brew install-bundler-gems + - 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-cleanup-before - - run: brew test-bot --only-setup + - run: brew test-bot --only-setup - - run: brew test-bot --only-tap-syntax + - run: brew test-bot --only-tap-syntax - - run: brew test-bot --only-formulae - if: github.event_name == 'pull_request' + - 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@main - with: - name: bottles - path: '*.bottle.*' + - name: Upload bottles as artifact + if: always() && github.event_name == 'pull_request' + uses: actions/upload-artifact@main + with: + name: bottles + path: '*.bottle.*'