Skip to content

Commit 0ed3822

Browse files
committed
fix docker build action
1 parent 58d7939 commit 0ed3822

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/build_image.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
workflow_dispatch:
1010
push:
1111

12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: ${{ github.repository }}
15+
1216
concurrency:
1317
group: ${{ github.workflow }}-${{ github.ref }}
1418
cancel-in-progress: true
@@ -25,15 +29,19 @@ jobs:
2529
permissions:
2630
contents: read
2731
packages: write
32+
attestations: write
33+
id-token: write
2834

2935
steps:
30-
- uses: actions/checkout@v4
36+
- name: Checkout code
37+
uses: actions/checkout@v4
3138

3239
- uses: docker/setup-buildx-action@v3
3340

34-
- uses: docker/login-action@v3
41+
- name: Login to GitHub Container Registry
42+
uses: docker/login-action@v3
3543
with:
36-
registry: ghcr.io
44+
registry: ${{ env.REGISTRY }}
3745
username: ${{ github.actor }}
3846
password: ${{ secrets.GITHUB_TOKEN }}
3947

@@ -53,7 +61,6 @@ jobs:
5361
context: .
5462
file: ./Dockerfile
5563
push: true
56-
cache-from: type=registry,ref=ghcr.io/scverse/spatialdata:buildcache
57-
cache-to: type=inline,ref=ghcr.io/scverse/spatialdata:buildcache
58-
target: build
59-
tags: ghcr.io/scverse/spatialdata:${{ steps.build.outputs.version }}
64+
cache-from: type=registry,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
65+
cache-to: type=inline,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
66+
tags: ${{ env.REGISTRY }}/scverse/spatialdata:${{ steps.build.outputs.version }}

0 commit comments

Comments
 (0)