fix: separate images into multiple workflows #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }} |