@@ -12,13 +12,10 @@ jobs:
1212 include :
1313 - name : servicecontrol
1414 project : ServiceControl
15- description : ServiceControl error instance
1615 - name : servicecontrol-audit
1716 project : ServiceControl.Audit
18- description : ServiceControl audit instance
1917 - name : servicecontrol-monitoring
2018 project : ServiceControl.Monitoring
21- description : ServiceControl monitoring instance
2219 fail-fast : false
2320 steps :
2421 - name : Check for secrets
@@ -38,26 +35,25 @@ jobs:
3835 with :
3936 version : ${{ env.MinVerVersion }}
4037 - name : Set up Docker Buildx
41- uses : docker/setup-buildx-action@v3.9.0
38+ uses : docker/setup-buildx-action@v3
4239 - name : Log in to GitHub container registry
43- run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
44- - name : Build & inspect image
45- env :
46- TAG_NAME : ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }}
47- run : |
48- docker buildx build --push --tag ghcr.io/particular/${{ matrix.name }}:${{ env.TAG_NAME }} \
49- --file src/${{ matrix.project }}/Dockerfile \
50- --build-arg VERSION=${{ env.MinVerVersion }} \
51- --annotation "index:org.opencontainers.image.title=${{ matrix.name }}" \
52- --annotation "index:org.opencontainers.image.description=${{ matrix.description }}" \
53- --annotation "index:org.opencontainers.image.created=$(date '+%FT%TZ')" \
54- --annotation "index:org.opencontainers.image.revision=${{ github.sha }}" \
55- --annotation "index:org.opencontainers.image.authors=Particular Software" \
56- --annotation "index:org.opencontainers.image.vendor=Particular Software" \
57- --annotation "index:org.opencontainers.image.version=${{ env.MinVerVersion }}" \
58- --annotation "index:org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/${{ github.sha }}" \
59- --annotation "index:org.opencontainers.image.url=https://hub.docker.com/r/particular/${{ matrix.name }}" \
60- --annotation "index:org.opencontainers.image.documentation=https://docs.particular.net/servicecontrol/" \
61- --annotation "index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra" \
62- --platform linux/arm64,linux/amd64 .
63- docker buildx imagetools inspect ghcr.io/particular/${{ matrix.name }}:${{ env.TAG_NAME }}
40+ uses : docker/login-action@v3
41+ with :
42+ registry : ghcr.io
43+ username : ${{ github.actor }}
44+ password : ${{ secrets.GITHUB_TOKEN }}
45+ - name : Get current date
46+ id : date
47+ run : echo "date=$(date '+%FT%TZ')" >> $GITHUB_OUTPUT
48+ - name : Build and push image to GitHub container registry
49+ uses : docker/build-push-action@v6
50+ with :
51+ push : true
52+ platforms : linux/amd64,linux/arm64
53+ sbom : true
54+ build-args : |
55+ VERSION=${{ env.MinVerVersion }}
56+ SHA=${{ github.sha }}
57+ CREATED=${{ steps.date.outputs.date }}
58+ file : src/${{ matrix.project }}/Dockerfile
59+ tags : ghcr.io/particular/${{ matrix.name }}:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }}
0 commit comments