mirror of
https://github.com/bckelley/phpmyadmin-docker-lightweight.git
synced 2026-08-24 03:24:11 -05:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
# Alexander Tebiev - https://github.com/beeyev
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
DOCKER_REGISTRY_IMAGE:
|
|
required: true
|
|
type: string
|
|
DOCKERFILE_PATH:
|
|
required: true
|
|
type: string
|
|
BASE_IMAGE_VERSION:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build-docker-image:
|
|
name: Build Docker Image
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Checkout branch - ${{ github.head_ref || github.ref_name }}
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Prepare Build Env Variables
|
|
uses: ./.github/actions/prepare-env-variables/
|
|
id: prepare-build-env-variables
|
|
|
|
- name: Set up Docker BuildX
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Build image and push to registry - ${{ inputs.DOCKER_REGISTRY_IMAGE }}
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64
|
|
context: .
|
|
file: ${{ inputs.DOCKERFILE_PATH }}
|
|
cache-from: type=registry,ref=${{ inputs.DOCKER_REGISTRY_IMAGE }}
|
|
cache-to: type=inline
|
|
build-args: |
|
|
BASE_IMAGE_VERSION=${{ inputs.BASE_IMAGE_VERSION }}
|
|
BUILD_DATE=${{ steps.prepare-build-env-variables.outputs.BUILD_DATE }}
|
|
BUILD_FINGERPRINT=${{ steps.prepare-build-env-variables.outputs.BUILD_FINGERPRINT }}
|
|
BRANCH_NAME=${{ steps.prepare-build-env-variables.outputs.CURRENT_BRANCH_NAME }}
|
|
tags: ${{ inputs.DOCKER_REGISTRY_IMAGE }}
|
|
push: true
|