Skip to content

improve(coder): fix install code-server, add minimal image #39

improve(coder): fix install code-server, add minimal image

improve(coder): fix install code-server, add minimal image #39

name: build-push-coder-base
on:
workflow_dispatch:
pull_request:
paths:
- "docker/coder/base.Dockerfile"
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: tuana9a
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: docker/coder
file: docker/coder/base.Dockerfile
push: true
tags: tuana9a/coder:base
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Send Telegram message
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
MESSAGE="OK build tuana9a/coder:base"
curl -s -X POST https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${TELEGRAM_CHAT_ID} -d text="${MESSAGE}"