File tree Expand file tree Collapse file tree 2 files changed +20
-16
lines changed
Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -554,20 +554,20 @@ export class AtomicServer {
554554
555555 @func ( )
556556 /** Creates Docker images for all supported architectures */
557- async createDockerImages ( ) : Promise < void > {
557+ async createDockerImages ( @ argument ( ) tag : string = "latest" ) : Promise < void > {
558558 const targets = Object . keys ( TARGET_IMAGE_MAP ) ;
559- const tag = "latest" ;
560559
561- // Build the amd64 variant first (this will be our base)
562- const amd64Image = this . createDockerImage ( "x86_64-unknown-linux-musl" ) ;
560+ // Build one variant first.
561+ let firstImageArchitecture = "x86_64-unknown-linux-musl" ;
562+ const firstImage = this . createDockerImage ( firstImageArchitecture ) ;
563563
564564 // Build other variants
565565 const otherVariants = targets
566- . filter ( ( target ) => target !== "x86_64-unknown-linux-musl" )
566+ . filter ( ( target ) => target !== firstImageArchitecture )
567567 . map ( ( target ) => this . createDockerImage ( target ) ) ;
568568
569569 // Publish the multi-platform image with all variants
570- await amd64Image . publish ( `joepmeneer/atomic-server:${ tag } ` , {
570+ await firstImage . publish ( `joepmeneer/atomic-server:${ tag } ` , {
571571 platformVariants : otherVariants ,
572572 } ) ;
573573 }
Original file line number Diff line number Diff line change 55 earthly :
66 name : Earthly
77 runs-on : ubuntu-latest
8- env :
9- EARTHLY_TOKEN : ${{ secrets.EARTHLY_TOKEN }}
108 steps :
11- - uses : earthly/actions-setup@v1
12- with :
13- github-token : ${{ secrets.GITHUB_TOKEN }}
14- version : " latest"
159 - uses : actions/checkout@v2
1610 - name : Log in to Docker Hub
1711 uses : docker/login-action@v3
@@ -24,11 +18,21 @@ jobs:
2418 with :
2519 images : joepmeneer/atomic-server
2620 github-token : ${{ secrets.GITHUB_TOKEN }}
27- - name : Earthly +tests
28- run : earthly --org ontola --ci --sat henk -P +tests
29- - name : Earthly +builds
21+ - name : Dagger CI
22+ 23+ with :
24+ version : " latest"
25+ cloud-token : ${{ secrets.DAGGER_CLOUD_TOKEN }}
26+ verb : call
27+ args : ci
28+ - name : Docker images
3029 if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
31- run : earthly --org ontola --ci --sat henk -P --push +builds --tags="${{ steps.meta.outputs.tags }}"
30+ 31+ with :
32+ version : " latest"
33+ cloud-token : ${{ secrets.DAGGER_CLOUD_TOKEN }}
34+ verb : call
35+ args : create-docker-images --tags ${{ steps.meta.outputs.tags }}
3236 - name : Upload artifacts
3337 uses : actions/upload-artifact@v4
3438 with :
You can’t perform that action at this time.
0 commit comments