Skip to content

Commit 43b2c03

Browse files
author
Davidson Gomes
committed
Merge branch 'release/0.0.10'
2 parents 2d98cb7 + eebe995 commit 43b2c03

File tree

3 files changed

+120
-41
lines changed

3 files changed

+120
-41
lines changed

.github/workflows/docker-image.yml

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,48 @@
1-
name: Docker Image CI
1+
name: Build Docker image
22

33
on:
44
push:
5-
branches: ["main", "develop"]
6-
pull_request:
7-
branches: ["main", "develop"]
8-
9-
env:
10-
GHCR_REGISTRY: ghcr.io
11-
DOCKERHUB_REGISTRY: docker.io
12-
IMAGE_NAME: ${{ github.repository }}
13-
DOCKERHUB_IMAGE: evoapicloud/evo-ai
5+
tags:
6+
- "*.*.*"
147

158
jobs:
16-
build-and-push:
9+
build_deploy:
10+
name: Build and Deploy
1711
runs-on: ubuntu-latest
1812
permissions:
1913
contents: read
2014
packages: write
21-
2215
steps:
23-
- name: Checkout repository
16+
- name: Checkout
2417
uses: actions/checkout@v4
2518

26-
- name: Log in to GitHub Container Registry
27-
uses: docker/login-action@v3
28-
with:
29-
registry: ${{ env.GHCR_REGISTRY }}
30-
username: ${{ github.actor }}
31-
password: ${{ secrets.GITHUB_TOKEN }}
32-
33-
- name: Log in to Docker Hub
34-
uses: docker/login-action@v3
35-
with:
36-
registry: ${{ env.DOCKERHUB_REGISTRY }}
37-
username: ${{ secrets.DOCKERHUB_USERNAME }}
38-
password: ${{ secrets.DOCKERHUB_TOKEN }}
39-
40-
- name: Extract metadata for Docker
19+
- name: Docker meta
4120
id: meta
4221
uses: docker/metadata-action@v5
4322
with:
44-
images: |
45-
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
46-
${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKERHUB_IMAGE }}
47-
tags: |
48-
type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
49-
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
50-
type=sha
51-
type=ref,event=branch
52-
type=ref,event=tag
23+
images: evoapicloud/evo-ai
24+
tags: type=semver,pattern=v{{version}}
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
5328

5429
- name: Set up Docker Buildx
5530
uses: docker/setup-buildx-action@v3
5631

32+
- name: Login to GitHub Container Registry
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
5738
- name: Build and push
39+
id: docker_build
5840
uses: docker/build-push-action@v5
5941
with:
60-
context: .
61-
push: ${{ github.event_name != 'pull_request' }}
42+
platforms: linux/amd64,linux/arm64
43+
push: true
6244
tags: ${{ steps.meta.outputs.tags }}
6345
labels: ${{ steps.meta.outputs.labels }}
64-
cache-from: type=gha
65-
cache-to: type=gha,mode=max
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
build_deploy:
10+
name: Build and Deploy
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: evoapicloud/evo-ai
24+
tags: homolog
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v5
41+
with:
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_deploy:
10+
name: Build and Deploy
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: evoapicloud/evo-ai
24+
tags: latest
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v5
41+
with:
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)