Skip to content

Commit

Permalink
fix docker build action
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato committed Jan 22, 2025
1 parent 58d7939 commit 0ed3822
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
workflow_dispatch:
push:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -25,15 +29,19 @@ jobs:
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

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

- uses: docker/login-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -53,7 +61,6 @@ jobs:
context: .
file: ./Dockerfile
push: true
cache-from: type=registry,ref=ghcr.io/scverse/spatialdata:buildcache
cache-to: type=inline,ref=ghcr.io/scverse/spatialdata:buildcache
target: build
tags: ghcr.io/scverse/spatialdata:${{ steps.build.outputs.version }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
cache-to: type=inline,ref=${{ env.REGISTRY }}/scverse/spatialdata:buildcache
tags: ${{ env.REGISTRY }}/scverse/spatialdata:${{ steps.build.outputs.version }}

0 comments on commit 0ed3822

Please sign in to comment.