mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(workflow): split Docker build and push into separate workflows for Monaco and LSP images
This commit is contained in:
parent
862fbf1379
commit
24a1b60a8a
@ -1,19 +1,18 @@
|
|||||||
name: Docker Build and Push
|
name: Build & Push LSP Docker Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
paths:
|
||||||
|
- docker/lsp/**
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-build-and-push:
|
build-and-push-lsp-docker-images:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- image: monaco-editor-lsp-next
|
|
||||||
context: .
|
|
||||||
file: Dockerfile
|
|
||||||
- image: lsp-c
|
- image: lsp-c
|
||||||
context: ./docker/lsp/clangd
|
context: ./docker/lsp/clangd
|
||||||
file: ./docker/lsp/clangd/Dockerfile
|
file: ./docker/lsp/clangd/Dockerfile
|
||||||
@ -34,7 +33,7 @@ jobs:
|
|||||||
# - name: Set up QEMU
|
# - name: Set up QEMU
|
||||||
# uses: docker/setup-qemu-action@v3
|
# uses: docker/setup-qemu-action@v3
|
||||||
# with:
|
# with:
|
||||||
# platforms: amd64
|
# platforms: amd64,arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -46,4 +45,4 @@ jobs:
|
|||||||
file: ${{ matrix.file }}
|
file: ${{ matrix.file }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest
|
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest
|
||||||
# platforms: linux/amd64
|
# platforms: linux/amd64,linux/arm64
|
43
.github/workflows/docker-monaco.yml
vendored
Normal file
43
.github/workflows/docker-monaco.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Build & Push Monaco Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-monaco-docker-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- image: monaco-editor-lsp-next
|
||||||
|
context: .
|
||||||
|
file: 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,arm64
|
||||||
|
|
||||||
|
- 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,linux/arm64
|
Loading…
Reference in New Issue
Block a user