mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 00:03:27 +10:00
parallelize ci workflow
This commit is contained in:
71
.github/workflows/build-deploy.yml
vendored
71
.github/workflows/build-deploy.yml
vendored
@ -6,8 +6,8 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-amd64:
|
||||||
name: Build
|
name: Build (amd64)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -16,9 +16,6 @@ jobs:
|
|||||||
image:
|
image:
|
||||||
- client
|
- client
|
||||||
- server
|
- server
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
@ -62,7 +59,67 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: linux/amd64
|
||||||
|
file: ${{ matrix.image }}/Dockerfile
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
build-args: |
|
||||||
|
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
||||||
|
|
||||||
|
build-arm64:
|
||||||
|
name: Build (arm64)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
image:
|
||||||
|
- client
|
||||||
|
- server
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v3.5.3
|
||||||
|
|
||||||
|
- name: Retrieve version from package.json
|
||||||
|
id: version
|
||||||
|
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||||
|
|
||||||
|
- name: Docker Metadaata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4.6.0
|
||||||
|
with:
|
||||||
|
images: amruthpillai/reactive-resume
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ matrix.image }}-latest
|
||||||
|
type=raw,value=${{ matrix.image }}-${{ steps.version.outputs.current-version }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.2.0
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2.9.0
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2.2.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2.2.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: $GITHUB_REPOSITORY_OWNER
|
||||||
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and Push
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v4.1.1
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: linux/arm64
|
||||||
file: ${{ matrix.image }}/Dockerfile
|
file: ${{ matrix.image }}/Dockerfile
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
@ -73,7 +130,7 @@ jobs:
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
needs: build
|
needs: build-amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install DigitalOcean CLI
|
- name: Install DigitalOcean CLI
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reactive-resume",
|
"name": "reactive-resume",
|
||||||
"version": "3.8.0",
|
"version": "3.8.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run dev",
|
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user