ci: use simpler caching mechanisms (#2236)
This commit is contained in:
@@ -12,11 +12,6 @@ on:
|
||||
required: false
|
||||
default: ''
|
||||
type: string
|
||||
refresh_shared_cache:
|
||||
description: 'Rebuild from scratch and refresh the shared image cache'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -67,7 +62,6 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push Preview image
|
||||
if: ${{ !inputs.refresh_shared_cache }}
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
@@ -82,21 +76,3 @@ jobs:
|
||||
cache-from: |
|
||||
type=gha,scope=image-shared
|
||||
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache
|
||||
|
||||
- name: Build and push Preview image with cache refresh
|
||||
if: ${{ inputs.refresh_shared_cache }}
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
no-cache: true
|
||||
tags: |
|
||||
ghcr.io/grimmory-tools/grimmory:${{ env.preview_tag }}
|
||||
build-args: |
|
||||
APP_VERSION=${{ env.preview_tag }}
|
||||
APP_REVISION=${{ env.commit_sha }}
|
||||
cache-to: |
|
||||
type=gha,scope=image-shared,mode=max
|
||||
type=registry,ref=ghcr.io/grimmory-tools/grimmory:buildcache,mode=max
|
||||
|
||||
Reference in New Issue
Block a user