mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 00:45:46 -04:00
code-server-golang update/add workflows
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
name: Issue & PR Tracker
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened,reopened,labeled,unlabeled,closed]
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted,edited,dismissed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
manage-project:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
name: Permission check
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
paths:
|
||||||
|
- '**/run'
|
||||||
|
- '**/finish'
|
||||||
|
- '**/check'
|
||||||
|
jobs:
|
||||||
|
permission_check:
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
|
||||||
|
|
||||||
ARG GO_VERSION
|
ARG GO_VERSION
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
|
||||||
grep && \
|
grep && \
|
||||||
if [ -z ${GO_VERSION+x} ]; then \
|
if [ -z ${GO_VERSION+x} ]; then \
|
||||||
GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
|
GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
echo "ensuring golang is in PATH"
|
|
||||||
if grep -q -E '^(export )?PATH=' /etc/services.d/code-server/run; then
|
|
||||||
if ! grep -q -E '^(export )?PATH=.*/usr/local/go/bin.*' /etc/services.d/code-server/run; then
|
|
||||||
sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/services.d/code-server/run
|
|
||||||
fi
|
|
||||||
if ! grep -q -E '^(export )?PATH=.*/config/go/bin:.*' /etc/services.d/code-server/run; then
|
|
||||||
sed -i 's/PATH=/PATH=\/config\/go\/bin:/g' /etc/services.d/code-server/run
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-golang\nexport PATH=/config/go/bin:$PATH:/usr/local/go/bin' /etc/services.d/code-server/run
|
|
||||||
fi
|
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
|
||||||
if [ -f "/golang/golang_${ARCH}.tar.gz" ]; then
|
|
||||||
echo "Installing golang"
|
|
||||||
tar xzf "/golang/golang_${ARCH}.tar.gz" -C /usr/local
|
|
||||||
rm -rf /golang
|
|
||||||
|
|
||||||
echo "Installing gcc, to make CGO work"
|
|
||||||
apt-get install -y gcc
|
|
||||||
else
|
|
||||||
echo "Golang already installed, skipping"
|
|
||||||
fi
|
|
||||||
@@ -1,15 +1,11 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
echo "**** ensuring golang is in PATH ****"
|
echo "**** ensuring golang is in PATH ****"
|
||||||
if grep -q -E '^(export )?PATH=' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
|
if ! grep -q -E '.*/usr/local/go/bin.*' /var/run/s6/container_environment/PATH; then
|
||||||
if ! grep -q -E '^(export )?PATH=.*/usr/local/go/bin.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
|
printf ':/usr/local/go/bin' >> /var/run/s6/container_environment/PATH
|
||||||
sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/s6-overlay/s6-rc.d/svc-code-server/run
|
fi
|
||||||
fi
|
if ! grep -q -E '.*/config/go/bin:.*' /var/run/s6/container_environment/PATH; then
|
||||||
if ! grep -q -E '^(export )?PATH=.*/config/go/bin:.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
|
sed -i '1s|^|/config/go/bin:|' /var/run/s6/container_environment/PATH
|
||||||
sed -i 's/PATH=/PATH=\/config\/go\/bin:/g' /etc/s6-overlay/s6-rc.d/svc-code-server/run
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-golang\nexport PATH=/config/go/bin:$PATH:/usr/local/go/bin' /etc/s6-overlay/s6-rc.d/svc-code-server/run
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|||||||
Reference in New Issue
Block a user