Skip to content

Commit 98c6cd2

Browse files
authored
Merge pull request #639 from linuxserver/code-server-golang-update
code-server-golang update/add workflows
2 parents 60d5910 + a2ba44e commit 98c6cd2

File tree

7 files changed

+35
-40
lines changed

7 files changed

+35
-40
lines changed

.github/workflows/BuildImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2.3.3
19+
- uses: actions/checkout@v3
2020

2121
- name: Build image
2222
run: |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Issue & PR Tracker
2+
3+
on:
4+
issues:
5+
types: [opened,reopened,labeled,unlabeled,closed]
6+
pull_request_target:
7+
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
8+
pull_request_review:
9+
types: [submitted,edited,dismissed]
10+
11+
jobs:
12+
manage-project:
13+
permissions:
14+
issues: write
15+
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
16+
secrets: inherit

.github/workflows/permissions.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Permission check
2+
on:
3+
pull_request_target:
4+
paths:
5+
- '**/run'
6+
- '**/finish'
7+
- '**/check'
8+
jobs:
9+
permission_check:
10+
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
24

35
ARG GO_VERSION
46

57
RUN \
68
apk add --no-cache \
7-
curl \
89
grep && \
910
if [ -z ${GO_VERSION+x} ]; then \
1011
GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \

root/etc/cont-init.d/95-apt-get

Lines changed: 0 additions & 3 deletions
This file was deleted.

root/etc/cont-init.d/98-golang

Lines changed: 0 additions & 25 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
#!/usr/bin/with-contenv bash
22

33
echo "**** ensuring golang is in PATH ****"
4-
if grep -q -E '^(export )?PATH=' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
5-
if ! grep -q -E '^(export )?PATH=.*/usr/local/go/bin.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
6-
sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/s6-overlay/s6-rc.d/svc-code-server/run
7-
fi
8-
if ! grep -q -E '^(export )?PATH=.*/config/go/bin:.*' /etc/s6-overlay/s6-rc.d/svc-code-server/run; then
9-
sed -i 's/PATH=/PATH=\/config\/go\/bin:/g' /etc/s6-overlay/s6-rc.d/svc-code-server/run
10-
fi
11-
else
12-
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
4+
if ! grep -q '/usr/local/go/bin' /var/run/s6/container_environment/PATH; then
5+
printf ':/usr/local/go/bin' >> /var/run/s6/container_environment/PATH
6+
fi
7+
if ! grep -q '/config/go/bin' /var/run/s6/container_environment/PATH; then
8+
sed -i '1s|^|/config/go/bin:|' /var/run/s6/container_environment/PATH
139
fi
1410

1511
ARCH=$(uname -m)

0 commit comments

Comments
 (0)