add sem var to docker image workflow

This commit is contained in:
Maidul Islam
2023-05-01 20:43:28 -04:00
committed by GitHub
parent b462ca3e89
commit 837ea2ef40
+16 -5
View File
@@ -1,12 +1,17 @@
name: Build, Publish and Deploy to Gamma name: Build, Publish and Deploy to Gamma
on: [workflow_dispatch] on:
push:
tags:
- "infisical/v*.*.*"
jobs: jobs:
backend-image: backend-image:
name: Build backend image name: Build backend image
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Extract version from tag
id: extract_version
run: echo "::set-output name=version::${GITHUB_REF_NAME#infisical/}"
- name: ☁️ Checkout source - name: ☁️ Checkout source
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: 📦 Install dependencies to test all dependencies - name: 📦 Install dependencies to test all dependencies
@@ -51,15 +56,19 @@ jobs:
token: ${{ secrets.DEPOT_PROJECT_TOKEN }} token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
push: true push: true
context: backend context: backend
tags: infisical/backend:${{ steps.commit.outputs.short }}, tags: |
infisical/backend:${{ steps.commit.outputs.short }}
infisical/backend:latest infisical/backend:latest
infisical/backend:${{ steps.extract_version.outputs.version }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
frontend-image: frontend-image:
name: Build frontend image name: Build frontend image
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Extract version from tag
id: extract_version
run: echo "::set-output name=version::${GITHUB_REF_NAME#infisical/}"
- name: ☁️ Checkout source - name: ☁️ Checkout source
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Save commit hashes for tag - name: Save commit hashes for tag
@@ -100,8 +109,10 @@ jobs:
push: true push: true
token: ${{ secrets.DEPOT_PROJECT_TOKEN }} token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
context: frontend context: frontend
tags: infisical/frontend:${{ steps.commit.outputs.short }}, tags: |
infisical/frontend:${{ steps.commit.outputs.short }}
infisical/frontend:latest infisical/frontend:latest
infisical/frontend:${{ steps.extract_version.outputs.version }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
build-args: | build-args: |
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }} POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}