-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: separate images into multiple workflows
- Loading branch information
1 parent
1203a2e
commit 05f46fb
Showing
2 changed files
with
35 additions
and
24 deletions.
There are no files selected for viewing
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,34 @@ | ||
name: Dev Container Build and Push base image | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
pull_requests: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
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.GITHUB_TOKEN }} | ||
if: github.event_name != 'pull_request' | ||
|
||
- name: Pre-build base image | ||
uses: devcontainers/[email protected] | ||
with: | ||
subFolder: .github/devcontainer/base | ||
imageName: ghcr.io/${{ github.repository }}/base | ||
cacheFrom: ghcr.io/${{ github.repository }}/base | ||
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Dev Container Build and Push Image | ||
name: Dev Container Build and Push images | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -10,29 +10,6 @@ on: | |
- "main" | ||
|
||
jobs: | ||
build-base: | ||
runs-on: ubuntu-latest | ||
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.GITHUB_TOKEN }} | ||
if: github.event_name != 'pull_request' | ||
|
||
- name: Pre-build base image | ||
uses: devcontainers/[email protected] | ||
with: | ||
subFolder: .github/devcontainer/base | ||
imageName: ghcr.io/${{ github.repository }}/base | ||
cacheFrom: ghcr.io/${{ github.repository }}/base | ||
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }} | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|