Skip to content

Commit

Permalink
NONE Create a base image with the features
Browse files Browse the repository at this point in the history
  • Loading branch information
frinzekt committed Feb 24, 2024
1 parent 54d5cad commit 174c93d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/devcontainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: codersforcauses/cfc-devenv

jobs:
# Build and push Docker image with Buildx (don't push on PR)
Expand Down Expand Up @@ -49,11 +49,16 @@ jobs:
id: build-and-push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ${{ github.workspace}}/.devcontainer/
context: ${{ github.workspace}}/cfc-devenv-base/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-base:main
cache-to: type=inline
file: ${{ github.workspace}}/.devcontainer/Dockerfile
file: ${{ github.workspace}}/cfc-devenv-base/Dockerfile
platforms: linux/amd64,linux/arm64

- name: Build and push Devcontainer image
run: |
npm install -g @devcontainers/cli
devcontainer build --config cfc-devenv/devcontainer.json --workspace-folder . --push true --image-name ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --platform linux/amd64,linux/arm64
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": {
"dockerfile": "Dockerfile",
"cacheFrom": [
"type=registry,ref=ghcr.io/codersforcauses/automated-setups:main",
"type=local,src=../docker-cache"
"type=registry,ref=ghcr.io/codersforcauses/cfc-devenv-base:main",
"type=local,src=./docker-cache"
]
},

Expand Down

0 comments on commit 174c93d

Please sign in to comment.