Skip to content

Commit f139025

Browse files
committed
Push base
1 parent 9867e4f commit f139025

File tree

1 file changed

+9
-30
lines changed

1 file changed

+9
-30
lines changed

.github/workflows/ci-cd.yml

+9-30
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,19 @@ jobs:
3535
with:
3636
push: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/mainnet' || github.ref == 'refs/heads/testnet' || github.ref == 'refs/heads/ci-refactoring') }}
3737
file: ./docker/Dockerfile.base
38-
context: ./
38+
context: .
3939
tags: ghcr.io/planb-network/blms-base:${{ github.sha }}
4040
cache-from: type=gha,scope=global
4141
cache-to: type=gha,mode=max,scope=global
42-
outputs: type=docker,dest=/tmp/image.tar
43-
44-
- name: Upload Docker image for base
45-
uses: actions/upload-artifact@v4
46-
with:
47-
name: base-image-${{ github.sha }}
48-
path: /tmp/image.tar
4942

5043
build_api:
5144
name: Build API
5245
if: (github.event_name == 'push') && (github.ref == 'refs/heads/mainnet' || github.ref == 'refs/heads/testnet' || github.ref == 'refs/heads/ci-refactoring')
5346
runs-on: ubuntu-latest
5447
needs: build_base
5548
env:
56-
base: ghcr.io/planb-network/blms-base:${{ github.sha }}
5749
image: ghcr.io/planb-network/blms-api
50+
base: ghcr.io/planb-network/blms-base:${{ github.sha }}
5851
steps:
5952
- name: Checkout code
6053
uses: actions/checkout@v4
@@ -71,14 +64,6 @@ jobs:
7164
username: ${{ github.actor }}
7265
password: ${{ secrets.GITHUB_TOKEN }}
7366

74-
- name: Download blms-base image
75-
uses: actions/download-artifact@v4
76-
with:
77-
name: base-image-${{ github.sha }}
78-
79-
- name: Load blms-base image
80-
run: docker load --input ${{ github.workspace }}/image.tar
81-
8267
- name: Set Docker image metadata
8368
uses: docker/metadata-action@v5
8469
id: meta
@@ -93,9 +78,10 @@ jobs:
9378
- name: Build and push Docker image for api
9479
uses: docker/build-push-action@v6
9580
with:
96-
push: ${{ (github.event_name == 'push') && (github.ref != 'refs/heads/ci-refactoring') }}
81+
# push: ${{ (github.event_name == 'push') && (github.ref != 'refs/heads/ci-refactoring') }}
82+
push: true
9783
file: ./apps/api/docker/Dockerfile
98-
context: ./
84+
context: .
9985
tags: ${{ steps.meta.outputs.tags }}
10086
cache-from: type=gha,scope=global
10187
cache-to: type=gha,mode=max,scope=global
@@ -108,8 +94,8 @@ jobs:
10894
runs-on: ubuntu-latest
10995
needs: build_base
11096
env:
111-
base: ghcr.io/planb-network/blms-base:${{ github.sha }}
11297
image: ghcr.io/planb-network/blms-web
98+
base: ghcr.io/planb-network/blms-base:${{ github.sha }}
11399
steps:
114100
- name: Checkout code
115101
uses: actions/checkout@v4
@@ -126,14 +112,6 @@ jobs:
126112
username: ${{ github.actor }}
127113
password: ${{ secrets.GITHUB_TOKEN }}
128114

129-
- name: Download blms-base image
130-
uses: actions/download-artifact@v4
131-
with:
132-
name: base-image-${{ github.sha }}
133-
134-
- name: Load blms-base image
135-
run: docker load --input ${{ github.workspace }}/image.tar
136-
137115
- name: Set Docker image metadata for web
138116
uses: docker/metadata-action@v5
139117
id: meta
@@ -148,9 +126,10 @@ jobs:
148126
- name: Build and push Docker image for web
149127
uses: docker/build-push-action@v6
150128
with:
151-
push: ${{ (github.event_name == 'push') && (github.ref != 'refs/heads/ci-refactoring') }}
129+
# push: ${{ (github.event_name == 'push') && (github.ref != 'refs/heads/ci-refactoring') }}
130+
push: true
152131
file: ./apps/web/docker/Dockerfile
153-
context: ./
132+
context: .
154133
tags: ${{ steps.meta.outputs.tags }}
155134
cache-from: type=gha,scope=global
156135
cache-to: type=gha,mode=max,scope=global

0 commit comments

Comments
 (0)