Skip to content

Commit

Permalink
Merge pull request #41 from Digital-Defiance/40-setup-devcontainer-pr…
Browse files Browse the repository at this point in the history
…e-builds

feat: setup pre-build workflow
  • Loading branch information
RuiFilipeCampos authored Aug 26, 2024
2 parents 1256b6e + 1844580 commit 37b1efd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .devcontainer/resolv.conf

This file was deleted.

File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions .github/workflows/pre-build-dev-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dev Container Build and Push Image

on:
workflow_dispatch:
push:
paths:
- '.github/.devcontainer/**'
branches:
- "main"
tags:
- "v*.*.*"

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/[email protected]
with:
subFolder: .github
imageName: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}
cacheFrom: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}
push: always

0 comments on commit 37b1efd

Please sign in to comment.