mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 01:26:09 +00:00
add cache to build after test step
This commit is contained in:
@@ -76,6 +76,13 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: 🔧 Set up Docker Buildx
|
- name: 🔧 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
- name: 🐋 Login to Docker Hub
|
- name: 🐋 Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -84,12 +91,32 @@ jobs:
|
|||||||
- name: 📦 Build frontend and export to Docker
|
- name: 📦 Build frontend and export to Docker
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
# load: true
|
load: true
|
||||||
push: false
|
|
||||||
context: frontend
|
context: frontend
|
||||||
tags: infisical/frontend:test
|
tags: infisical/frontend:test
|
||||||
cache-from: type=gha
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
build-args: |
|
||||||
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
|
- name: ⏻ Spawn frontend container
|
||||||
|
run: |
|
||||||
|
docker run -d --rm --name infisical-frontend-test infisical/frontend:test
|
||||||
|
- name: 🧪 Test frontend image
|
||||||
|
run: |
|
||||||
|
./.github/resources/healthcheck.sh infisical-frontend-test
|
||||||
|
- name: ⏻ Shut down frontend container
|
||||||
|
run: |
|
||||||
|
docker stop infisical-frontend-test
|
||||||
|
- name: 🏗️ Build frontend and push
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
push: false
|
||||||
|
context: frontend
|
||||||
|
tags: infisical/frontend:${{ steps.commit.outputs.short }},
|
||||||
|
infisical/frontend:latest
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
- # Temp fix
|
- # Temp fix
|
||||||
|
|||||||
Reference in New Issue
Block a user