|
3 | 3 | workflow_dispatch: {} |
4 | 4 | push: |
5 | 5 | branches: [ main, develop ] |
| 6 | + tags: [ "*" ] |
6 | 7 | paths-ignore: |
7 | 8 | # - ".github/**" |
8 | 9 | - ".drone.yml" |
9 | 10 | - "helm/**" |
10 | 11 | - "*.md" |
11 | 12 | - "docs/**" |
12 | 13 |
|
13 | | - |
14 | | - |
15 | 14 | jobs: |
16 | | - docker-build: |
| 15 | + build-openmina-node-image: |
17 | 16 | runs-on: ubuntu-latest |
18 | 17 | steps: |
19 | 18 | - name: Git checkout |
|
39 | 38 | tags: | |
40 | 39 | type=ref,event=branch |
41 | 40 | type=sha,format=short |
| 41 | + type=semver,pattern={{version}},event=tag |
| 42 | + type=ref,event=tag |
| 43 | + type=raw,value=latest,enable={{is_default_branch}} |
42 | 44 |
|
43 | 45 | - name: Build and push |
44 | 46 | uses: docker/build-push-action@v5 |
|
48 | 50 | tags: ${{ steps.meta.outputs.tags }} |
49 | 51 | cache-from: type=gha |
50 | 52 | cache-to: type=gha,mode=max |
| 53 | + |
| 54 | + build-openmina-frontend-image: |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - name: Git checkout |
| 58 | + uses: actions/checkout@v3 |
| 59 | + |
| 60 | + - name: Login to Docker Hub |
| 61 | + uses: docker/login-action@v3 |
| 62 | + with: |
| 63 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 64 | + password: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 65 | + |
| 66 | + - name: Set up Docker Buildx |
| 67 | + uses: docker/setup-buildx-action@v3 |
| 68 | + |
| 69 | + - name: Docker meta |
| 70 | + id: meta |
| 71 | + uses: docker/metadata-action@v5 |
| 72 | + with: |
| 73 | + # list of Docker images to use as base name for tags |
| 74 | + images: | |
| 75 | + openmina/frontend |
| 76 | + # generate Docker tags based on the following events/attributes |
| 77 | + tags: | |
| 78 | + type=ref,event=branch |
| 79 | + type=sha,format=short |
| 80 | + type=semver,pattern={{version}},event=tag |
| 81 | + type=ref,event=tag |
| 82 | + type=raw,value=latest,enable={{is_default_branch}} |
| 83 | +
|
| 84 | + - name: Build and push |
| 85 | + uses: docker/build-push-action@v5 |
| 86 | + with: |
| 87 | + context: ./frontend |
| 88 | + build-args: | |
| 89 | + BUILD_CONFIGURATION=compose |
| 90 | + push: true |
| 91 | + tags: ${{ steps.meta.outputs.tags }} |
| 92 | + cache-from: type=gha |
| 93 | + cache-to: type=gha,mode=max |
0 commit comments