fix: add gh to custom (#56)
* fix: add gh to custom * fix gh script multi arch * Dockerfile use bash directly * Update build-ubuntu.yml --------- Co-authored-by: Ryan <me@hackerc.at> Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
@@ -220,6 +220,7 @@ jobs:
|
|||||||
- rust
|
- rust
|
||||||
- dotnet
|
- dotnet
|
||||||
- java-tools
|
- java-tools
|
||||||
|
- gh
|
||||||
- custom
|
- custom
|
||||||
include:
|
include:
|
||||||
- PLATFORMS: linux/amd64,linux/arm64
|
- PLATFORMS: linux/amd64,linux/arm64
|
||||||
@@ -234,6 +235,8 @@ jobs:
|
|||||||
TYPE: dotnet
|
TYPE: dotnet
|
||||||
- PLATFORMS: linux/amd64,linux/arm64
|
- PLATFORMS: linux/amd64,linux/arm64
|
||||||
TYPE: java-tools
|
TYPE: java-tools
|
||||||
|
- PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
TYPE: gh
|
||||||
- PLATFORMS: linux/amd64,linux/arm64
|
- PLATFORMS: linux/amd64,linux/arm64
|
||||||
TYPE: custom
|
TYPE: custom
|
||||||
steps:
|
steps:
|
||||||
@@ -281,8 +284,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
with:
|
|
||||||
platforms: arm64
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ SHELL [ "/bin/bash", "--login", "-e", "-o", "pipefail", "-c" ]
|
|||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
COPY ./linux/${DISTRO}/scripts /imagegeneration/installers
|
COPY ./linux/${DISTRO}/scripts /imagegeneration/installers
|
||||||
RUN /imagegeneration/installers/${TYPE}.sh
|
RUN bash /imagegeneration/installers/${TYPE}.sh
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG BUILD_TAG=${TYPE}
|
ARG BUILD_TAG=${TYPE}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ case "$(uname -m)" in
|
|||||||
'aarch64')
|
'aarch64')
|
||||||
scripts=(
|
scripts=(
|
||||||
basic
|
basic
|
||||||
|
gh
|
||||||
pwsh
|
pwsh
|
||||||
go
|
go
|
||||||
js
|
js
|
||||||
@@ -45,6 +46,7 @@ case "$(uname -m)" in
|
|||||||
'x86_64')
|
'x86_64')
|
||||||
scripts=(
|
scripts=(
|
||||||
basic
|
basic
|
||||||
|
gh
|
||||||
pwsh
|
pwsh
|
||||||
go
|
go
|
||||||
js
|
js
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
# source: https://github.com/actions/virtual-environments/blob/be27ebfdb31aece2c90fbe1984c1749cbd1b464c/images/linux/scripts/installers/github-cli.sh
|
# source: https://github.com/actions/virtual-environments/blob/be27ebfdb31aece2c90fbe1984c1749cbd1b464c/images/linux/scripts/installers/github-cli.sh
|
||||||
|
|
||||||
# Install GitHub CLI
|
# Install GitHub CLI
|
||||||
url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r ".assets[].browser_download_url|select(contains(\"linux\") and contains(\"$(arch)\") and contains(\".deb\"))")
|
ARCH=$(uname -m)
|
||||||
|
if [ "$ARCH" = x86_64 ]; then ARCH=amd64; fi
|
||||||
|
if [ "$ARCH" = aarch64 ]; then ARCH=arm64; fi
|
||||||
|
if [ "$ARCH" = armv7l ]; then ARCH=armv6; fi
|
||||||
|
|
||||||
|
url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r ".assets[].browser_download_url|select(contains(\"linux\") and contains(\"$ARCH\") and contains(\".deb\"))")
|
||||||
wget -q "$url" -O "/tmp/gh.deb"
|
wget -q "$url" -O "/tmp/gh.deb"
|
||||||
apt install /tmp/gh.deb
|
apt install /tmp/gh.deb
|
||||||
|
|||||||
Reference in New Issue
Block a user