File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Save-And-Restore Docker Image CI
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ tags :
7+ - ' **'
8+
9+ env :
10+ REGISTRY : ghcr.io
11+ IMAGE_NAME : phoebus-save-and-restore
12+
13+ jobs :
14+ build-and-push-image :
15+ permissions :
16+ contents : read
17+ packages : write
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - name : Set up JDK 17
22+ uses : actions/setup-java@v4
23+ with :
24+ java-version : ' 17'
25+ distribution : ' temurin'
26+ cache : maven
27+ - name : Build with Maven
28+ run : mvn --batch-mode --update-snapshots package
29+ - name : Login to the registry
30+ uses : docker/login-action@v3
31+ with :
32+ registry : ${{ env.REGISTRY }}
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+ - name : Extract meta-data for Docker
36+ id : meta
37+ uses : docker/metadata-action@v5
38+ with :
39+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+ - name : Set up Docker Build
41+ uses : docker/setup-buildx-action@v3
42+ - name : Build and publish the Docker image
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : services/save-and-restore
46+ push : true
47+ platforms : linux/amd64
48+ tags : ${{ steps.meta.output.tags }}
49+ labels : ${{ steps.meta.aoutput.labels }}
50+ cache-from : type-gha
51+ cache-to : type-gha,mode=max
You can’t perform that action at this time.
0 commit comments