mirror of
https://github.com/Redume/Kekkai.git
synced 2025-04-02 21:37:36 +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:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -11,11 +11,11 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/kekkai
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changes:
|
changes:
|
||||||
name: detect what files changed
|
name: Detect changed files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
chart:
|
chart:
|
||||||
- 'chart/**'
|
- 'chart/**'
|
||||||
CR:
|
CR:
|
||||||
- 'collecy-currency/**'
|
- 'collect-currency/**'
|
||||||
web:
|
web:
|
||||||
- 'web/**'
|
- 'web/**'
|
||||||
|
|
||||||
|
@ -48,27 +48,22 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
- uses: docker/login-action@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- id: meta
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.IMAGE_PREFIX }}-server
|
||||||
|
tags: |
|
||||||
- name: Build and push Docker image
|
type=raw,value=latest
|
||||||
uses: docker/build-push-action@v5
|
type=ref,event=branch
|
||||||
|
type=sha
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
file: Dockerfile-server
|
file: Dockerfile-server
|
||||||
context: .
|
context: .
|
||||||
|
@ -86,27 +81,22 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
- uses: docker/login-action@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- id: meta
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.IMAGE_PREFIX }}-chart
|
||||||
|
tags: |
|
||||||
- name: Build and push Docker image
|
type=raw,value=latest
|
||||||
uses: docker/build-push-action@v5
|
type=ref,event=branch
|
||||||
|
type=sha
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
file: ./chart/Dockerfile
|
file: ./chart/Dockerfile
|
||||||
context: ./chart
|
context: ./chart
|
||||||
|
@ -115,7 +105,6 @@ jobs:
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
|
||||||
build-and-push-CR:
|
build-and-push-CR:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: ${{ needs.changes.outputs.CR == 'true' }}
|
if: ${{ needs.changes.outputs.CR == 'true' }}
|
||||||
|
@ -125,27 +114,22 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
- uses: docker/login-action@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- id: meta
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.IMAGE_PREFIX }}-collect-currency
|
||||||
|
tags: |
|
||||||
- name: Build and push Docker image
|
type=raw,value=latest
|
||||||
uses: docker/build-push-action@v5
|
type=ref,event=branch
|
||||||
|
type=sha
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
file: Dockerfile-collect-currency
|
file: Dockerfile-collect-currency
|
||||||
context: .
|
context: .
|
||||||
|
@ -163,31 +147,26 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
- uses: docker/login-action@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- id: meta
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.IMAGE_PREFIX }}-web
|
||||||
|
tags: |
|
||||||
- name: Build and push Docker image
|
type=raw,value=latest
|
||||||
uses: docker/build-push-action@v5
|
type=ref,event=branch
|
||||||
|
type=sha
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
file: Dockerfile-web
|
file: Dockerfile-web
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
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