Skip to content

fix: resolve typescript error related to localization type #19

fix: resolve typescript error related to localization type

fix: resolve typescript error related to localization type #19

name: Build and Publish Docker Images to GHCR
# Trigger the workflow only on pushes to the main branch
on:
push:
workflow_dispatch:
pull_request:
types:
- synchronize
- opened
# TODO: replace it later
# push:
# branches:
# - main
permissions:
contents: read
packages: write
jobs:
build-and-push-images:
name: Build and Push Docker Images
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Step 3: Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
# GITHUB_TOKEN has read and write permissions by default in the context of GitHub Actions
password: ${{ secrets.GITHUB_TOKEN }}
# Step 4: Build and push Docker images
- name: Build and Push ORCID Worker Image
uses: docker/build-push-action@v4
with:
context: server
file: server/workers/orcid/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/orcid-worker:latest
- name: Build and Push API Worker Image
uses: docker/build-push-action@v4
with:
context: server
file: server/workers/api/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/api-worker:latest
- name: Build and Push BASE Worker Image
uses: docker/build-push-action@v4
with:
context: server
file: server/workers/base/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/base-worker:latest
# Uncomment and add similar steps for other workers
# - name: Build and Push DATAPROCESSING Worker Image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: server/workers/dataprocessing/Dockerfile
# push: true
# tags: ghcr.io/${{ github.repository_owner }}/dataprocessing-worker:latest
# - name: Build and Push METRICS Worker Image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: server/workers/metrics/Dockerfile
# push: true
# tags: ghcr.io/${{ github.repository_owner }}/metrics-worker:latest
# Add more build steps as needed for other workers
# Optional: Add a final step to verify or notify
- name: Verify Docker Images
run: |
echo "Docker images have been successfully built and pushed to GHCR."