-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.32 KB
/
homebrew.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 }}
env:
HOMEBREW_NO_ANALYTICS: 1
NONINTERACTIVE: 1
outputs:
base64: string
installer: string
checksum: string
steps:
- name: Install Dependencies
run: |
zypper install --no-confirm git-core
- name: Download Homebrew Installer
run: |
curl --location --silent --fail --show-error --output /opt/install-homebrew.bash https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
- name: Calculate SHA256
run: |
SHA256="$(sha256sum /opt/install-homebrew.bash | cut -d ' ' -f 1)"
echo "sha256=${SHA256}" >> "${GITHUB_OUTPUT}"
- name: Base64 Encode
run: |
BASE64="$(base64 --wrap=0 /opt/install-homebrew.bash)"
echo "base64=${BASE64}" >> "${GITHUB_OUTPUT}"
- name: Escape Multiline String
run: |
INSTALLER="$(perl -p -e 's/%/%25/gs; s/\n/%0A/gs; s/\r/%0B/gs;' /opt/install-homebrew.bash)"
echo "installer=${INSTALLER}" >> "${GITHUB_OUTPUT}"