Skip to content

Update homebrew.yaml #20

Update homebrew.yaml

Update homebrew.yaml #20

Workflow file for this run

name: Homebrew
on:
workflow_call: {}
workflow_dispatch: {}
push:
paths: .github/workflows/homebrew.yaml
jobs:
download:
container: registry.suse.com/bci/bci-base:15.6.47.5.5
runs-on: repo-${{ github.repository_id }}-amd64-k8s
# runs-on: runs-on,runner=1cpu-linux-arm64,run-id=${{ github.run_id }}
outputs:
base64: "${{ steps.download.outputs.base64 }}"
installer: "${{ steps.download.outputs.escaped }}"
checksum: "${{ steps.checksum.outputs.sha256 }}"
steps:
- name: Install Dependencies
run: |
zypper install --no-confirm git-core
- name: Download Installer
run: |
curl --location --silent --fail --show-error --output /opt/install-homebrew.bash https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
BASE64="$(base64 --wrap=0 /opt/install-homebrew.bash)"
echo "base64=${BASE64}" >> "${GITHUB_OUTPUT}"
INSTALLER="$(perl -p -e 's/%/%25/gs; s/\n/%0A/gs; s/\r/%0B/gs;' /opt/install-homebrew.bash)"
echo "escaped=${INSTALLER}" >> "${GITHUB_OUTPUT}"
- name: Calculate Checksum(s)
id: checksum
run: |
SHA256="$(sha256sum /opt/install-homebrew.bash | cut -d ' ' -f 1)"
echo "sha256=${SHA256}" | tee -a "${GITHUB_OUTPUT}"
install:
needs: download
container: registry.suse.com/bci/bci-base:15.6.47.5.5
runs-on: repo-${{ github.repository_id }}-amd64-k8s
env:
HOMEBREW_NO_ANALYTICS: 1
NONINTERACTIVE: 1
steps:
- name: Validate Checksum
run: |
SHA256=$(echo "${{ needs.download.outputs.installer }}" | sha256sum | cut -d ' ' -f 1)
test "${SHA256}" = "${{ needs.download.outputs.checksum }}"