mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Docker Build and Push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
docker-build-and-push:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- image: monaco-editor-lsp-next
|
|
context: .
|
|
file: Dockerfile
|
|
- image: lsp-c
|
|
context: ./docker/lsp/clangd
|
|
file: ./docker/lsp/clangd/Dockerfile
|
|
- image: lsp-cpp
|
|
context: ./docker/lsp/clangd
|
|
file: ./docker/lsp/clangd/Dockerfile
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
# - name: Set up QEMU
|
|
# uses: docker/setup-qemu-action@v3
|
|
# with:
|
|
# platforms: amd64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push ${{ matrix.image }}
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ${{ matrix.context }}
|
|
file: ${{ matrix.file }}
|
|
push: true
|
|
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest
|
|
# platforms: linux/amd64
|