Merge pull request #162 from zacharyfleck/master #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |