mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 07:43:10 +10:00
85 lines
2.3 KiB
YAML
85 lines
2.3 KiB
YAML
name: Build Docker Image
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
client:
|
|
name: Client
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3.0.2
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2.0.0
|
|
|
|
- id: buildx
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2.0.0
|
|
with:
|
|
install: true
|
|
|
|
- id: variables
|
|
name: Get Short SHA
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
|
|
- name: Build Client Image
|
|
uses: docker/build-push-action@v3.1.1
|
|
with:
|
|
context: .
|
|
push: false
|
|
file: client/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
amruthpillai/reactive-resume:client-latest
|
|
amruthpillai/reactive-resume:client-${{ steps.variables.outputs.sha_short }}
|
|
ghcr.io/amruthpillai/reactive-resume:client-latest
|
|
ghcr.io/amruthpillai/reactive-resume:client-${{ steps.variables.outputs.sha_short }}
|
|
|
|
server:
|
|
name: Server
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3.0.2
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2.0.0
|
|
|
|
- id: buildx
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2.0.0
|
|
with:
|
|
install: true
|
|
|
|
- id: variables
|
|
name: Get Short SHA
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
|
|
- name: Build Server Image
|
|
uses: docker/build-push-action@v3.1.1
|
|
with:
|
|
context: .
|
|
push: false
|
|
file: server/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
amruthpillai/reactive-resume:server-latest
|
|
amruthpillai/reactive-resume:server-${{ steps.variables.outputs.sha_short }}
|
|
ghcr.io/amruthpillai/reactive-resume:server-latest
|
|
ghcr.io/amruthpillai/reactive-resume:server-${{ steps.variables.outputs.sha_short }}
|