Skip to content

fix: separate images into multiple workflows #1

fix: separate images into multiple workflows

fix: separate images into multiple workflows #1

name: Dev Container Build and Push base image
on:
workflow_dispatch:
push:
branches:
- "main"
pull_requests:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: Pre-build base image
uses: devcontainers/[email protected]
with:
subFolder: .github/devcontainer/base
imageName: ghcr.io/${{ github.repository }}/base
cacheFrom: ghcr.io/${{ github.repository }}/base
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }}