Skip to content

Update and rename docker-build-test.yml to build-devcontainer.yml #1

Update and rename docker-build-test.yml to build-devcontainer.yml

Update and rename docker-build-test.yml to build-devcontainer.yml #1

name: 'pre-build and test devcontainer image'
on:
# workflow_dispatch:
# inputs:
# imageName:
# description: 'Image name to build'
# required: true
# default: 'ghcr.io/lgersman/devcontainer-boilerplate'
# rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
permissions:
# write-all is too much, but we need to write to packages
# see https://github.com/orgs/community/discussions/57724 for more info
contents: read
packages: write
attestations: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build image and run make ci-build in dev container
uses: devcontainers/ci@v0.3
with:
push: always
# Change this to point to your image name
imageName: ghcr.io/lgersman/devcontainer-boilerplate
cacheFrom: ghcr.io/lgersman/devcontainer-boilerplate
# Change this to be your CI task/script
runCmd: |
echo "Using image ghcr.io/lgersman/devcontainer-boilerplate"
pnpm install
pnpm build
echo "It seems to work !"