File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ concurrency:
1212
1313env :
1414 PYTHON_VERSION : " 3.13"
15+ REGISTRY : ghcr.io
16+ IMAGE_NAME : ${{ github.repository }}
1517
1618jobs :
1719 determine_changes :
6971
7072 - name : " Validate project metadata"
7173 run : uvx --from 'validate-pyproject[all,store]' validate-pyproject pyproject.toml
74+
75+ build-and-publish :
76+ runs-on : ubuntu-latest
77+
78+ permissions :
79+ contents : read
80+ packages : write
81+ # attestations: write
82+ id-token : write
83+
84+ steps :
85+ - name : Checkout repository
86+ uses : actions/checkout@v4
87+
88+ - name : Log in to the Container registry
89+ uses : docker/login-action@v3
90+ with :
91+ registry : ${{ env.REGISTRY }}
92+ username : ${{ github.actor }}
93+ password : ${{ secrets.GITHUB_TOKEN }}
94+
95+ - name : Extract metadata (tags, labels) for Docker
96+ id : meta
97+ uses : docker/metadata-action@v5
98+ with :
99+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
100+
101+ - name : Set up Docker Buildx
102+ uses : docker/setup-buildx-action@v3
103+
104+ - name : Build and push Docker image
105+ id : push
106+ uses : docker/build-push-action@v6
107+ with :
108+ context : ./
109+ file : ./Dockerfile
110+ platforms : linux/amd64
111+ push : true
112+ tags : ${{ steps.meta.outputs.tags }}
113+ labels : ${{ steps.meta.outputs.labels }}
114+ cache-from : type=gha
115+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments