Skip to content

Commit fe00bfe

Browse files
authored
Merge pull request #15 from seqeralabs/feat/auto-build-studios
feat: auto-build studio images when Dockerfiles change
2 parents e750e8c + d1e3545 commit fe00bfe

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/docker.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@ name: Build and Push Docker Images
33
on:
44
release:
55
types: [published]
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- '**/Dockerfile'
611
workflow_dispatch:
712
inputs:
813
tag:
9-
description: 'Tag to use for the images (e.g., v1.0.0)'
10-
required: true
14+
description: 'Tag to use for the images (e.g., v1.0.0). Defaults to "latest"'
15+
required: false
1116
type: string
17+
default: 'latest'
18+
# renovate: datasource=docker depName=public.cr.seqera.io/platform/connect-client
1219
connect_client_version:
1320
description: 'Version of connect-client to use (e.g., 0.9)'
14-
required: true
21+
required: false
1522
type: string
1623
default: '0.9'
1724

1825
env:
1926
REGISTRY: ghcr.io
20-
# Use release tag for releases, or input tag for manual runs
21-
IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag }}
27+
# Use release tag for releases, input tag for manual runs, or 'latest' for push
28+
IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag || 'latest' }}
2229
# Use provided connect-client version or default to 0.9
2330
CONNECT_CLIENT_VERSION: ${{ inputs.connect_client_version || '0.9' }}
2431

@@ -59,6 +66,7 @@ jobs:
5966
with:
6067
context: ${{ matrix.container.path }}
6168
push: true
69+
platforms: linux/amd64
6270
build-args: |
6371
CONNECT_CLIENT_VERSION=${{ env.CONNECT_CLIENT_VERSION }}
6472
tags: |
@@ -69,5 +77,5 @@ jobs:
6977
org.opencontainers.image.description=Custom Studios Example Container for ${{ matrix.container.name }}
7078
org.opencontainers.image.licenses=MIT
7179
org.opencontainers.image.version=${{ env.IMAGE_TAG }}
72-
cache-from: type=gha
73-
cache-to: type=gha,mode=max
80+
cache-from: type=gha,scope=${{ matrix.container.name }}
81+
cache-to: type=gha,mode=max,scope=${{ matrix.container.name }}

0 commit comments

Comments
 (0)