Skip to content

fix: build devcontainer error #35

fix: build devcontainer error

fix: build devcontainer error #35

name: Build Dev Container Image
on:
push:
branches: [ dev-env ]
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build and Push Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Prepare devcontainer config
run: |
npm i -g strip-json-comments-cli
sudo apt-get install -y jq
echo "$(strip-json-comments .devcontainer/devcontainer.json | jq '.dockerComposeFile[1]="docker-compose.build.yml"')" > .devcontainer/devcontainer.json
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: ./.devcontainer
push: true
tags: ghcr.io/0xffff-one/flarum-0x-devcontainer:latest