Skip to content

Commit 8e13260

Browse files
committed
🚀 Add dev container publishing workflow
- Create devcontainer.yml workflow to publish image to GHCR - Update integration.yml to use published image cache - Publishes ghcr.io/roots/acorn-devcontainer:latest from main branch
1 parent 174099a commit 8e13260

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/devcontainer.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Dev Container
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- '.devcontainer/**'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Log in to GitHub Container Registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and push Dev Container
28+
uses: devcontainers/ci@v0.3
29+
with:
30+
imageName: ghcr.io/roots/acorn-devcontainer
31+
cacheFrom: ghcr.io/roots/acorn-devcontainer
32+
push: always

.github/workflows/integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
uses: devcontainers/ci@v0.3
1717
with:
1818
configFile: .devcontainer/devcontainer.json
19+
cacheFrom: ghcr.io/roots/acorn-devcontainer
20+
push: never
1921
runCmd: |
2022
# Wait for database to be ready
2123
while ! mysqladmin ping -h"database" --silent; do

0 commit comments

Comments
 (0)