From 09bb26712d5a0a69904c8d6d88a2635758db6799 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Wed, 29 Nov 2023 17:45:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B9=20mommy=20patches=20homebrew=20and?= =?UTF-8?q?=20aur=20during=20tests~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 - .github/workflows/ci.yml | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0315657..6d3b683 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -247,7 +247,6 @@ jobs: echo "::endgroup::" echo "::group::Commit changes" - git add --all git config --global user.name "FWDekkerBot" git config --global user.email "bot@fwdekker.com" git commit -am "🔖 mommy added package mommy $MOMMY_VERSION~" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c6fa19..967c9b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,14 @@ jobs: repository: FWDekker/homebrew-mommy path: homebrew-mommy ref: dev + - name: Patch homebrew-mommy + working-directory: homebrew-mommy + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + # Point the formula to the commit that is being tested in this workflow + sed -i -e "s|head \(.*\), branch: .*|head \1, revision: \"$RELEVANT_SHA\"|g" mommy.rb + git -c user.name="ignore" -c user.email="ignore" commit -am "ignore" - name: Test Homebrew package run: | echo "::group::Enable Homebrew" @@ -161,9 +169,11 @@ jobs: run: chown -R build:build ./aur-mommy/ - name: Test AUR package working-directory: ./aur-mommy/ + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} run: | echo "::group::Patch" - sudo -u build ./update.sh dev + sudo -u build ./update.sh "$RELEVANT_SHA" echo "::endgroup::" echo "::group::Build and install" @@ -312,6 +322,14 @@ jobs: repository: FWDekker/homebrew-mommy path: homebrew-mommy ref: dev + - name: Patch homebrew-mommy + working-directory: homebrew-mommy + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + # Point the formula to the commit that is being tested in this workflow + sed -i -e "s|head \(.*\), branch: .*|head \1, revision: \"$RELEVANT_SHA\"|g" mommy.rb + git -c user.name="ignore" -c user.email="ignore" commit -am "ignore" - name: Test Homebrew package run: | echo "::group::Enable Homebrew"