diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 756f55ec..ffed9c00 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -16,7 +16,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 + - uses: actions/checkout@v3 - name: Build image run: | diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml new file mode 100644 index 00000000..2c307843 --- /dev/null +++ b/.github/workflows/call_issue_pr_tracker.yml @@ -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 diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml new file mode 100644 index 00000000..1447bc55 --- /dev/null +++ b/.github/workflows/permissions.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 2bb4afe9..6cd47f6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 RUN \ apk add --no-cache \ - curl \ grep && \ if [ -z ${GO_VERSION+x} ]; then \ GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '.*linux-amd64.*' | grep -oP '(?<=go).*(?=.linux)'); \ diff --git a/root/etc/cont-init.d/95-apt-get b/root/etc/cont-init.d/95-apt-get deleted file mode 100644 index 3a725eac..00000000 --- a/root/etc/cont-init.d/95-apt-get +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -apt-get update \ No newline at end of file diff --git a/root/etc/cont-init.d/98-golang b/root/etc/cont-init.d/98-golang deleted file mode 100644 index 374b3245..00000000 --- a/root/etc/cont-init.d/98-golang +++ /dev/null @@ -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 diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run b/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run index af31ccc9..7e58b397 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run @@ -1,15 +1,11 @@ #!/usr/bin/with-contenv bash 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 '^(export )?PATH=.*/usr/local/go/bin.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then - sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/s6-overlay/s6-rc.d/svc-code-server/run - fi - if ! grep -q -E '^(export )?PATH=.*/config/go/bin:.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then - 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 +if ! grep -q '/usr/local/go/bin' /var/run/s6/container_environment/PATH; then + printf ':/usr/local/go/bin' >> /var/run/s6/container_environment/PATH +fi +if ! grep -q '/config/go/bin' /var/run/s6/container_environment/PATH; then + sed -i '1s|^|/config/go/bin:|' /var/run/s6/container_environment/PATH fi ARCH=$(uname -m)