diff --git a/.github/workflows/automerge.yaml b/.github/workflows/automerge.yaml new file mode 100644 index 0000000..0840499 --- /dev/null +++ b/.github/workflows/automerge.yaml @@ -0,0 +1,46 @@ +name: Automerge version bumps + +on: + pull_request: + branches: [ master ] + paths: + - "!**" + - "Formula/cockroach.rb" + - "Formula/cockroach@*.rb" + - "cockroach-sql.rb" + +permissions: + contents: write + pull-requests: write + +jobs: + automerge: + runs-on: ubuntu-latest + # if: ${{ github.actor == 'cockroach-teamcity' }} + if: ${{ github.actor == 'rail' }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: List changed files + id: files + uses: jitterbit/get-changed-files@v1 + - name: Regenerate the patch + run: | + set -euxo pipefail + for changed_file in ${{ steps.files.outputs.all }}; do + version="$(grep 'version "' "$changed_file" | cut -d'"' -f2)" + git checkout origin/master -- "$changed_file" + filename=$(basename $changed_file) + make PRODUCT="${filename%.*}" VERSION="$version" + done + - name: Verify nothing changed + run: git diff --exit-code + - name: Approve a PR + run: gh pr review --approve "${{github.event.pull_request.html_url}}" + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge + run: gh pr merge --auto --merge "${{github.event.pull_request.html_url}}" + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/Formula/cockroach.rb b/Formula/cockroach.rb index a72ef7f..289c7d7 100644 --- a/Formula/cockroach.rb +++ b/Formula/cockroach.rb @@ -4,15 +4,15 @@ class Cockroach < Formula desc "Distributed SQL database" homepage "https://www.cockroachlabs.com" - version "23.2.5" + version "23.2.4" on_macos do on_intel do - url "https://binaries.cockroachdb.com/cockroach-v23.2.5.darwin-10.9-amd64.tgz" - sha256 "df4126568c3bded296d61e4fba5ee14f0ac3029dff25ba82d55c5580d04f5408" + url "https://binaries.cockroachdb.com/cockroach-v23.2.4.darwin-10.9-amd64.tgz" + sha256 "ddc299285a973af9bd11f35b94461799deccbca020ace262c358f5fc3ce9ce00" end on_arm do - url "https://binaries.cockroachdb.com/cockroach-v23.2.5.darwin-11.0-arm64.tgz" - sha256 "1f213ef13a565bf0e4f5cab0b957fcb34584c4561a46f1af014bd4dc2d8449c1" + url "https://binaries.cockroachdb.com/cockroach-v23.2.4.darwin-11.0-arm64.tgz" + sha256 "0e7065e7d3221c75090568a076743182ef957deb7eb09f8f00831c77f4fb613c" end end