mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 20:47:34 +00: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
5 changed files with 52 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue