Skip to content

Commit

Permalink
chore(devenv): 🔨 add devcontainer config and then add some VSC extens…
Browse files Browse the repository at this point in the history
…ions

Signed-off-by: Andrei Jiroh Halili <[email protected]>
  • Loading branch information
ajhalili2006 committed May 19, 2023
1 parent b71ebb0 commit 7a8ce05
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM gitpod/workspace-go

LABEL org.opencontainers.image.source=https://github.com/RecapTime/squad-bots


############################################################
# Extracted from chunks:lang-node
############################################################
Expand Down Expand Up @@ -36,4 +35,4 @@ RUN brew install cmake
RUN wget https://prerelease.keybase.io/keybase_amd64.deb -O /tmp/keybase_amd64.deb \
&& sudo apt-get install --yes /tmp/keybase_amd64.deb
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
RUN brew install gh glab hadolint shellcheck
RUN brew install gh glab hadolint shellcheck dopplerhq/cli/doppler
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "service-accounts.recaptime.dev/git",
"remoteUser": "gitpod",
"build": {
"dockerfile": "./Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"postCreateCommand": {
"keybase-setup": "mkdir .keybase-userdata && KEYBASE_NO_GUI=1 run_keybase",
"setup": "go install && npm i"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"r3inbowari.gomodexplorer",
"exiasr.hadolint"
]
},
"codespaces": {
"repositories": {
"devcontainers/features": {
"permissions": {
"contents": "write",
"workflows": "write"
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: RecapTimeBot
password: ${{ secrets.GHCR_SERVICE_ACCOUNT_PASSWORD }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
Expand Down
14 changes: 14 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

image:
file: .devcontainer/Dockerfile

tasks:
- init: mkdir ./.keybase-userdata
before: |
KEYBASE_NO_GUI=1 run_keybase
go install && npm i
vscode:
extensions:
- golang.Go
- r3inbowari.gomodexplorer
- exiasr.hadolint
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"r3inbowari.gomodexplorer",
"golang.go"
]
}

0 comments on commit 7a8ce05

Please sign in to comment.