Skip to content

Commit 62625da

Browse files
committed
ci: build main and funke branches
1 parent 989a73e commit 62625da

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/cd.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
jobs:
1313
build-and-push-image-agent:
1414
runs-on: ubuntu-latest
15-
if: github.ref == 'refs/heads/main'
15+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/funke'
1616
permissions:
1717
contents: read
1818
packages: write
@@ -30,23 +30,27 @@ jobs:
3030
- name: Install dependencies
3131
run: pnpm install --no-frozen-lockfile
3232

33+
- run: AGENT_HOST=https://playground.animo.id pnpm build
34+
if: github.ref == 'refs/heads/main'
35+
3336
- run: AGENT_HOST=https://funke.animo.id pnpm build
37+
if: github.ref == 'refs/heads/funke'
3438

3539
- name: Log in to the Container registry
36-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
40+
uses: docker/login-action@v3
3741
with:
3842
registry: ${{ env.REGISTRY }}
3943
username: ${{ github.actor }}
4044
password: ${{ secrets.GITHUB_TOKEN }}
4145

4246
- name: Extract metadata (tags, labels) for Docker
4347
id: meta
44-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
48+
uses: docker/metadata-action@v5
4549
with:
4650
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.AGENT }}
4751

4852
- name: Build and push Docker image
49-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
53+
uses: docker/build-push-action@v6
5054
with:
5155
context: ./agent
5256
push: true
@@ -55,7 +59,7 @@ jobs:
5559

5660
build-and-push-image-app:
5761
runs-on: ubuntu-latest
58-
if: github.ref == 'refs/heads/main'
62+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/funke'
5963
permissions:
6064
contents: read
6165
packages: write
@@ -73,23 +77,27 @@ jobs:
7377
- name: Install dependencies
7478
run: pnpm install --no-frozen-lockfile
7579

76-
- run: NEXT_PUBLIC_API_URL=https://funke.animo.id pnpm build
80+
- run: AGENT_HOST=https://playground.animo.id pnpm build
81+
if: github.ref == 'refs/heads/main'
82+
83+
- run: AGENT_HOST=https://funke.animo.id pnpm build
84+
if: github.ref == 'refs/heads/funke'
7785

7886
- name: Log in to the Container registry
79-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
87+
uses: docker/login-action@v3
8088
with:
8189
registry: ${{ env.REGISTRY }}
8290
username: ${{ github.actor }}
8391
password: ${{ secrets.GITHUB_TOKEN }}
8492

8593
- name: Extract metadata (tags, labels) for Docker
8694
id: meta
87-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
95+
uses: docker/metadata-action@v5
8896
with:
8997
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.APP }}
9098

9199
- name: Build and push Docker image
92-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
100+
uses: docker/build-push-action@v6
93101
with:
94102
context: ./app
95103
push: true

0 commit comments

Comments
 (0)