Skip to content

Commit

Permalink
feat: Create pre-build-dev-container.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Campos <mail@ruicampos.org>
  • Loading branch information
RuiFilipeCampos authored Sep 6, 2024
1 parent 9278615 commit d9be93b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pre-build-dev-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Dev Container Build and Push Image

on:
workflow_dispatch:
push:
paths:
- '.github/.devcontainer/pre-build/**'
- '.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

0 comments on commit d9be93b

Please sign in to comment.