mirror of
https://github.com/Redume/Kekkai.git
synced 2025-04-01 21:07:35 +03:00
chore: assembling each microservice as a separate image
Some checks failed
Create and publish Docker images / Detect changed files (push) Failing after 32s
Create and publish Docker images / build-and-push-server (push) Has been skipped
Create and publish Docker images / build-and-push-web (push) Has been skipped
Create and publish Docker images / build-and-push-chart (push) Has been skipped
Create and publish Docker images / build-and-push-CR (push) Has been skipped
Some checks failed
Create and publish Docker images / Detect changed files (push) Failing after 32s
Create and publish Docker images / build-and-push-server (push) Has been skipped
Create and publish Docker images / build-and-push-web (push) Has been skipped
Create and publish Docker images / build-and-push-chart (push) Has been skipped
Create and publish Docker images / build-and-push-CR (push) Has been skipped
This commit is contained in:
parent
8a0b75e9ea
commit
8ce23cf311
1 changed files with 45 additions and 66 deletions
111
.github/workflows/docker.yml
vendored
111
.github/workflows/docker.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Create and publish a Docker image
|
||||
name: Create and publish Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -11,11 +11,11 @@ on:
|
|||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/kekkai
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
name: detect what files changed
|
||||
name: Detect changed files
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
@ -35,7 +35,7 @@ jobs:
|
|||
chart:
|
||||
- 'chart/**'
|
||||
CR:
|
||||
- 'collecy-currency/**'
|
||||
- 'collect-currency/**'
|
||||
web:
|
||||
- 'web/**'
|
||||
|
||||
|
@ -48,27 +48,22 @@ jobs:
|
|||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
images: ${{ env.IMAGE_PREFIX }}-server
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: Dockerfile-server
|
||||
context: .
|
||||
|
@ -86,27 +81,22 @@ jobs:
|
|||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
images: ${{ env.IMAGE_PREFIX }}-chart
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: ./chart/Dockerfile
|
||||
context: ./chart
|
||||
|
@ -115,7 +105,6 @@ jobs:
|
|||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
|
||||
build-and-push-CR:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.CR == 'true' }}
|
||||
|
@ -125,27 +114,22 @@ jobs:
|
|||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
images: ${{ env.IMAGE_PREFIX }}-collect-currency
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: Dockerfile-collect-currency
|
||||
context: .
|
||||
|
@ -163,31 +147,26 @@ jobs:
|
|||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
images: ${{ env.IMAGE_PREFIX }}-web
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: Dockerfile-web
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue