Skip to content

Create pre-build-devcontainer.yml #1

Create pre-build-devcontainer.yml

Create pre-build-devcontainer.yml #1

name: 'build'
on: # rebuild any PRs and main branch changes
pull_request: {}
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
CONTAINER_OWNER: ${{ github.repository_owner }}
CONTAINER_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ env.CONTAINER_OWNER }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ env.CONTAINER_OWNER }}/${{ env.CONTAINER_NAME }}
cacheFrom: ghcr.io/${{ env.CONTAINER_OWNER }}/${{ env.CONTAINER_NAME }}
push: always