File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed
Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+
2+ name : Build and Push Test Image
3+
4+ on :
5+ push :
6+ branches :
7+ - init-proj
8+ workflow_dispatch :
9+
10+ jobs :
11+ build-and-push-test-image :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v3
23+
24+ - name : Log in to the GitHub Container Registry
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ghcr.io
28+ username : ${{ github.repository_owner }}
29+ password : ${{ secrets.GB_TOKEN }}
30+
31+ # FIX: Use metadata-action to generate valid, lowercase tags automatically.
32+ - name : Extract metadata (tags, labels) for Docker
33+ id : meta
34+ uses : docker/metadata-action@v5
35+ with :
36+ # This will be automatically converted to lowercase: ghcr.io/euclidstellar/code-review-agent
37+ images : ghcr.io/${{ github.repository }}
38+ # For this workflow, we only want to generate a single tag: 'test'
39+ tags : type=raw,value=v1
40+
41+ - name : Build and push multi-platform image
42+ uses : docker/build-push-action@v5
43+ with :
44+ context : .
45+ push : true
46+ platforms : linux/amd64,linux/arm64
47+ # Use the valid tags generated by the metadata-action step
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -47,4 +47,4 @@ outputs:
4747
4848runs :
4949 using : ' docker'
50- image : ' docker://ghcr.io/euclidstellar/code-review-agent:test '
50+ image : ' docker://ghcr.io/euclidstellar/code-review-agent:v1 '
You can’t perform that action at this time.
0 commit comments