Skip to content

Commit

Permalink
code-server-golang update/add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aptalca committed May 17, 2023
1 parent 60d5910 commit a4ab4f0
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 39 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/call_issue_pr_tracker.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/workflows/permissions.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
Expand Down
3 changes: 0 additions & 3 deletions root/etc/cont-init.d/95-apt-get

This file was deleted.

25 changes: 0 additions & 25 deletions root/etc/cont-init.d/98-golang

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 -E '.*/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 -E '.*/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)
Expand Down

0 comments on commit a4ab4f0

Please sign in to comment.