mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: Reusable Image Builder
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
dockerfile:
|
|
required: true
|
|
type: string
|
|
build-json:
|
|
required: true
|
|
type: string
|
|
build-args:
|
|
required: false
|
|
default: ""
|
|
type: string
|
|
build-platforms:
|
|
required: false
|
|
default: linux/amd64,linux/arm64,linux/arm/v7
|
|
type: string
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ fromJSON(inputs.build-json).name }}-${{ fromJSON(inputs.build-json).version }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-image:
|
|
name: Build ${{ fromJSON(inputs.build-json).name }} @ ${{ fromJSON(inputs.build-json).version }}
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Login to Github Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: Build ${{ fromJSON(inputs.build-json).name }}
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ${{ inputs.dockerfile }}
|
|
tags: ${{ fromJSON(inputs.build-json).image_tag }}
|
|
platforms: ${{ inputs.build-platforms }}
|
|
build-args: ${{ inputs.build-args }}
|
|
push: true
|
|
cache-from: type=registry,ref=${{ fromJSON(inputs.build-json).cache_tag }}
|
|
cache-to: type=registry,mode=max,ref=${{ fromJSON(inputs.build-json).cache_tag }}
|