mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
name: Push to Docker Hub
|
|
|
|
on: [workflow_dispatch]
|
|
|
|
jobs:
|
|
|
|
backend-image:
|
|
name: Build backend image
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
-
|
|
name: ☁️ Checkout source
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: 🔧 Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: 🔧 Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: 🐋 Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
# -
|
|
# name: 📦 Build backend and export to Docker
|
|
# uses: docker/build-push-action@v3
|
|
# with:
|
|
# load: true
|
|
# context: backend
|
|
# tags: infisical/backend:test
|
|
# -
|
|
# name: 🧪 Test backend image
|
|
# run: |
|
|
# docker run --rm infisical/backend:test
|
|
-
|
|
name: 🏗️ Build backend and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
context: backend
|
|
tags: infisical/backend:latest
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
|
|
frontend-image:
|
|
name: Build frontend image
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
-
|
|
name: ☁️ Checkout source
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: 🔧 Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: 🔧 Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: 🐋 Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
# -
|
|
# name: 📦 Build frontend and export to Docker
|
|
# uses: docker/build-push-action@v3
|
|
# with:
|
|
# load: true
|
|
# context: frontend
|
|
# tags: infisical/frontend:test
|
|
# build-args: |
|
|
# POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
|
# -
|
|
# name: 🧪 Test frontend image
|
|
# run: |
|
|
# docker run --rm infisical/frontend:test
|
|
-
|
|
name: 🏗️ Build frontend and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
context: frontend
|
|
tags: infisical/frontend:latest
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: |
|
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|