mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-09 23:37:31 -05:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
name: Container Processing
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
env:
|
|
# Setting an environment variable with the value of a configuration variable
|
|
REACT_APP_GOOGLE_ANALYTICS: ${{ vars.REACT_APP_GOOGLE_ANALYTICS}}
|
|
REACT_APP_BACKEND_SERVER: ${{ vars.REACT_APP_BACKEND_SERVER}}
|
|
REACT_APP_FRONTEND_SERVER: ${{ vars.REACT_APP_FRONTEND_SERVER}}
|
|
REACT_APP_ADMIN_SERVER: ${{ vars.REACT_APP_ADMIN_SERVER}}
|
|
REACT_APP_ACCOUNT_SERVER: ${{ vars.REACT_APP_ACCOUNT_SERVER}}
|
|
REACT_APP_COOKIE_DOMAIN: ${{ vars.REACT_APP_COOKIE_DOMAIN}}
|
|
REACT_APP_ADMIN_EMAIL: ${{ vars.REACT_APP_ADMIN_EMAIL}}
|
|
REACT_APP_SITE_NAME: ${{ vars.REACT_APP_SITE_NAME}}
|
|
STAGE: ${{ vars.STAGE}}
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
strategy:
|
|
matrix:
|
|
service: [account, admin, backend, frontend, mongo, nginx-proxy]
|
|
name: Push Docker image to DockerHub
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
version: latest
|
|
|
|
- name: Log in to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ${{ matrix.service }}
|
|
platforms: linux/arm64,linux/amd64
|
|
push: true
|
|
tags: ${{ vars.DOCKER_NAMESPACE }}/trunk-server-${{ matrix.service }}:latest
|
|
build-args: STAGE=${{vars.STAGE}} |