File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "dockerfile" : " Dockerfile" ,
55 "options" : [
66 " --platform=linux/amd64"
7+ ],
8+ "cacheFrom" : [
9+ " type=gha,scope=devcontainer"
710 ]
811 },
912 "features" : {
Original file line number Diff line number Diff line change 1+ name : build devcontainer
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ tags :
7+ type : string
8+ required : true
9+ description : ' The tags to publish the image with'
10+ skip :
11+ type : boolean
12+ required : false
13+ default : false
14+ description : ' Skip the build and publish'
15+
16+ jobs :
17+ build-and-publish-devcontainer :
18+ runs-on : ubuntu-24.04
19+ permissions :
20+ contents : read
21+ packages : write
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@v3
27+ - name : Login to the registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ghcr.io
31+ username : ${{ github.repository_owner }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+ - name : Build dev container
34+ # NOTE: We only skip this and not the full Job
35+ # otherwise step that "need" it will not be started
36+ if : ${{ ! inputs.skip }}
37+ uses : docker/build-push-action@v6
38+ with :
39+ context : .devcontainer/
40+ push : true
41+ tags : ghcr.io/${{ github.repository }}/devcontainer:${{ inputs.tags }}
42+ cache-from : type=gha,scope=devcontainer
43+ cache-to : type=gha,mode=max,scope=devcontainer
You can’t perform that action at this time.
0 commit comments