Frontend CI #117
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: Frontend CI | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'packages/frontend/**' | |
env: | |
IMAGE_TAG: latest | |
IMAGE_REPO: ${{ secrets.DOCKER_USERNAME }} | |
jobs: | |
publish: | |
name: Publish Docker image | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
env: | |
APPS: frontend | |
PLATFORMS: linux/amd64,linux/arm64 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Install dependencies | |
run: yarn install | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build the image | |
run: yarn script build --push |