-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from cr2007/devcontainer
Feat: Adds Dev Container configuration
- Loading branch information
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "YouTranslate Dev Container", | ||
// Reference: https://github.com/devcontainers/images/tree/main/src/python | ||
"image": "ghcr.io/adiksondev/youtranslate:latest", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"eamodio.gitlens", | ||
"ms-python.python", | ||
"ms-python.pylint", | ||
"vscode-icons-team.vscode-icons", | ||
"njpwerner.autodocstring", | ||
"aaron-bond.better-comments", | ||
"GitHub.copilot", | ||
"GitHub.copilot-chat", | ||
"bierner.github-markdown-preview", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"ms-vsliveshare.vsliveshare", | ||
"EditorConfig.EditorConfig", | ||
"dotenv.dotenv-vscode" | ||
] | ||
} | ||
}, | ||
"forwardPorts": [5000], | ||
"portsAttributes": { | ||
"5000": { | ||
"label": "Application", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
|
||
"postCreateCommand": "sudo cp .devcontainer/welcome.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt", | ||
"postStartCommand": "pip install -r requirements.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Welcome to YouTranslate! 💻 You're currently on a custom Dev Container for GitHub Codespaces! | ||
|
||
To get started, make sure you have your API Key for the ElevenLab's speech synthesis | ||
ElevenLabs API: https://docs.elevenlabs.io/api-reference/quick-start/introduction | ||
|
||
Have fun! 😊 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "YouTranslate Dev Container", | ||
// Reference: https://github.com/devcontainers/images/tree/main/src/python | ||
"image": "mcr.microsoft.com/devcontainers/python:3", | ||
"features": { | ||
"ghcr.io/devcontainers/features/git-lfs:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
"version": "latest" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Dev Container Build and Push Image | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/**' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Convert Repository name to lower case | ||
id: lowercase | ||
run: echo "REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | ||
- name: Pre-build Dev Container image | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
subFolder: .github | ||
imageName: ghcr.io/${{ env.REPO }} | ||
cacheFrom: ghcr.io/${{ github.repository }} | ||
push: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters