mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 11:28:00 +00:00
2b1872f24e
- Rename PolkadotIcon to PezkuwiIcon - Update pinned chains for Pezkuwichain - Add pezkuwichain, bizinikiwi, pezkuwichain-js icons - Update favicon with Pezkuwi branding - Update package.json author to Dijital Kurdistan Tech Institute - Update GitHub links to pezkuwichain/pezkuwi-telemetry - Update backend Cargo.toml authors - Rewrite README with Pezkuwichain documentation - Add GitHub workflows (frontend-ci, backend-ci, docker, lock)
99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
name: Docker Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
BACKEND_IMAGE: ghcr.io/${{ github.repository }}-backend
|
|
FRONTEND_IMAGE: ghcr.io/${{ github.repository }}-frontend
|
|
|
|
jobs:
|
|
build-backend:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.BACKEND_IMAGE }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=semver,pattern={{version}}
|
|
type=sha
|
|
|
|
- name: Build and push backend
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./backend
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
build-frontend:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.FRONTEND_IMAGE }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=semver,pattern={{version}}
|
|
type=sha
|
|
|
|
- name: Build and push frontend
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./frontend
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|