Skip to content

fix(.github): fix workflow syntax error #2

fix(.github): fix workflow syntax error

fix(.github): fix workflow syntax error #2

name: Dev Container Build and Push Image
on:
workflow_dispatch:
push:
branches:
- "main"
pull_requests:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image: [base, dart, java, javascript]
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.REGISTRY_TOKEN }}
if: github.event_name != 'pull_request'
- name: "Pre-build '${{ matrix.image }}' image"
uses: devcontainers/ci@v0.3
with:
subFolder: .github/devcontainer//${{ matrix.image }}
imageName: ghcr.io/${{ github.repository }}/${{ matrix.image }}
cacheFrom: ghcr.io/${{ github.repository }}/${{ matrix.image }}
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }}