Skip to content

Dev Container Build and Push Image #8

Dev Container Build and Push Image

Dev Container Build and Push Image #8

name: Dev Container Build and Push Image
on:
workflow_dispatch:
push:
paths:
- '.github/.devcontainer/pre-build/.devcontainer.json'
- '.github/workflows/pre-build-dev-container.yml'
branches:
- "main"
tags:
- "v*.*.*"
permissions:
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
-
name: Checkout
id: checkout
uses: actions/checkout@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: lower-repo
run: |
echo "GITHUB_REPOSITORY_LOWER=${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
-
name: Pre-build dev container image
uses: devcontainers/ci@v0.3
with:
subFolder: .devcontainer/pre-build
imageName: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}-devcontainer
cacheFrom: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}-devcontainer
push: always