1- name : Build and publish agent image
2-
3- on :
4- push :
5- branches :
6- - main
7- paths :
8- - " agent/**"
9- - " .github/workflows/docker-publish.yml"
10- workflow_dispatch :
11-
12- env :
13- REGISTRY : ghcr.io
14- IMAGE_NAME : ghcr.io/${{ github.repository_owner }}/local-code-agent
15-
16- jobs :
17- build-and-push :
18- runs-on : ubuntu-latest
19- permissions :
20- contents : read
21- packages : write
22-
23- steps :
24- - name : Checkout repository
25- uses : actions/checkout@v4
26-
27- - name : Set up Docker Buildx
28- uses : docker/setup-buildx-action@v3
29-
30- - name : Log in to GHCR
31- uses : docker/login-action@v3
32- with :
33- registry : ${{ env.REGISTRY }}
34- username : ${{ github.actor }}
35- password : ${{ secrets.GITHUB_TOKEN }}
36-
37- - name : Extract Docker metadata
38- id : meta
39- uses : docker/metadata-action@v5
40- with :
41- images : ${{ env.IMAGE_NAME }}
42- tags : |
43- type=raw,value=latest
44- type=sha
45-
46- - name : Build and push agent image
47- uses : docker/build-push-action@v6
48- with :
49- context : ./agent
50- file : ./agent/Dockerfile
51- push : true
52- tags : ${{ steps.meta.outputs.tags }}
1+ name : Build and publish agent image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - " agent/**"
9+ - " .github/workflows/docker-publish.yml"
10+ workflow_dispatch :
11+
12+ env :
13+ REGISTRY : ghcr.io
14+ IMAGE_NAME : ghcr.io/${{ github.repository_owner }}/local-code-agent
15+
16+ jobs :
17+ build-and-push :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ packages : write
22+
23+ steps :
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+
27+ - name : Set up Docker Buildx
28+ uses : docker/setup-buildx-action@v3
29+
30+ - name : Log in to GHCR
31+ uses : docker/login-action@v3
32+ with :
33+ registry : ${{ env.REGISTRY }}
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - name : Extract Docker metadata
38+ id : meta
39+ uses : docker/metadata-action@v5
40+ with :
41+ images : ${{ env.IMAGE_NAME }}
42+ tags : |
43+ type=raw,value=latest
44+ type=sha
45+
46+ - name : Build and push agent image
47+ uses : docker/build-push-action@v6
48+ with :
49+ context : ./agent
50+ file : ./agent/Dockerfile
51+ push : true
52+ tags : ${{ steps.meta.outputs.tags }}
5353 labels : ${{ steps.meta.outputs.labels }}
0 commit comments