-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from Digital-Defiance/40-setup-devcontainer-pr…
…e-builds feat: setup pre-build workflow
- Loading branch information
Showing
4 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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
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 | ||
|