Skip to content

build-push-coder-base #42

build-push-coder-base

build-push-coder-base #42

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: Notify
run: |
MESSAGE="SUCCESS build-coder\\nimage: \`tuana9a/coder:base\`"
curl -X POST ${{ secrets.DISCORD_WEBHOOK }} -H "Content-Type: application/json" -d "{\"content\":\"${MESSAGE}\"}"