mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03:00
Meta: Prebuild repo dev container
This commit adds a GitHub Workflow to prebuild the dev container file present at .devcontainer/devcontainer.json. This prebuilt image is pushed to GitHub Container Registry (ghcr). An additional devcontainer.json is added consuming that image. This dev container can be selected in editors that process dev containers (ie GitHub Codespaces), to speed up time to editor.
This commit is contained in:
parent
202b24584f
commit
7026174458
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/joshspicer 🔰 Commit: https://github.com/SerenityOS/serenity/commit/7026174458 Pull-request: https://github.com/SerenityOS/serenity/pull/18971 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/gmta ✅
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "Ubuntu",
|
||||
"name": "SerenityOS",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:jammy",
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/implementors/features.
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||
"ghcr.io/devcontainers-contrib/features/pre-commit:1": {},
|
||||
"./serenity": {
|
||||
"./features/serenity": {
|
||||
"llvm_version": 15,
|
||||
"enable_ladybird": true,
|
||||
"enable_serenity": true
|
||||
|
11
.devcontainer/optimized/.devcontainer.json
Normal file
11
.devcontainer/optimized/.devcontainer.json
Normal file
@ -0,0 +1,11 @@
|
||||
// The docker image used below was generated from '.devcontainer/devcontainer.json'
|
||||
// by the '.github/workflows/dev-container.yml' workflow.
|
||||
//
|
||||
// By building this dev container image in advance, tools
|
||||
// like GitHub Codespaces (https://containers.dev/supporting)
|
||||
// do not need to install all the prerequsite dependencies from scratch,
|
||||
// getting you into your development environment faster!
|
||||
{
|
||||
"name": "SerenityOS (Pre-Built Image)",
|
||||
"image": "ghcr.io/SerenityOS/serenity-devcontainer:base"
|
||||
}
|
39
.github/workflows/dev-container.yml
vendored
Normal file
39
.github/workflows/dev-container.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# This workflow builds a docker image with the Dev Container CLI (https://github.com/devcontainers/cli)
|
||||
#
|
||||
name: 'Build Dev Container Image'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.devcontainer/**'
|
||||
schedule:
|
||||
# https://crontab.guru/#0_0_*_*_1
|
||||
- cron: '0 0 * * 1'
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# Push images to GHCR.
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Base Dev Container Image
|
||||
uses: devcontainers/ci@v0.3
|
||||
with:
|
||||
imageName: ghcr.io/${{ github.repository_owner }}/serenity-devcontainer
|
||||
imageTag: base,latest
|
||||
push: always
|
Loading…
Reference in New Issue
Block a user