diff options
author | Josh Spicer <josh@joshspicer.com> | 2023-05-21 20:59:53 -0700 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-24 19:27:59 +0200 |
commit | 7026174458ab15e2ac2d1c01c1cd24ed0e05b5d2 (patch) | |
tree | cc984921e099c6dfbdbbab8f432683e9a6b2f68e /.github/workflows | |
parent | 202b24584f3555eabc2d61c82350b2e3c5e3d07f (diff) | |
download | serenity-7026174458ab15e2ac2d1c01c1cd24ed0e05b5d2.zip |
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.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/dev-container.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/dev-container.yml b/.github/workflows/dev-container.yml new file mode 100644 index 0000000000..be3947750b --- /dev/null +++ b/.github/workflows/dev-container.yml @@ -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 |