Skip to content

Update homebrew.yaml #26

Update homebrew.yaml

Update homebrew.yaml #26

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.encode.outputs.base64 }}"
sha256: "${{ 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
- name: Encode
id: encode
run: |
BASE64="$(base64 --wrap=0 /opt/install-homebrew.bash)"
echo "base64=${BASE64}" >> "${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.base64 }}" | base64 -d | sha256sum | cut -d ' ' -f 1)
test "${SHA256}" = "${{ needs.download.outputs.sha256 }}"
- name: Install Homebrew
run: |
echo "${{ needs.download.outputs.base64 }}" | base64 -d | bash