Skip to content

S3C-9347 bump docker build action to V6 #1

S3C-9347 bump docker build action to V6

S3C-9347 bump docker build action to V6 #1

Workflow file for this run

---

Check failure on line 1 in .github/workflows/docker-build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-build.yaml

Invalid workflow file

You have an error in your yaml syntax
name: docker-build
on:
workflow_call:
inputs:
name:
required: true
type: string
namespace:
required: false
type: string
default: ${{ github.repository }}
tag:
required: false
type: string
default: "${{ github.sha }}"
labels:
required: false
type: string
default: |
git.repository=${{ github.repository }}
git.commit-sha=${{ github.sha }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
registry:
required: false
type: string
default: ghcr.io
push:
required: false
type: boolean
default: true
no-cache:
required: false
type: boolean
default: false
context:
required: false
type: string
default: .
file:
required: false
type: string
build-args:
required: false
type: string
lfs:
required: false
type: boolean
default: false
provenance:
required: false
type: boolean
default: true
secrets:
required: false
type: string
secrets:
REGISTRY_LOGIN:
required: false
REGISTRY_PASSWORD:
required: false
permissions:
packages: write
contents: read
jobs:
build:
env:
REGISTRY_LOGIN: "${{ secrets.REGISTRY_LOGIN || github.repository_owner }}"
REGISTRY_PASSWORD: "${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}"
FILE: ${{ inputs.file || format('{0}/Dockerfile', inputs.context) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: ${{ inputs.lfs }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ${{ inputs.registry }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ env.REGISTRY_LOGIN }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Build and push ${{ inputs.name }} image
uses: docker/build-push-action@v6
with:
context: ${{ inputs.context }}
provenance: ${{ inputs.provenance }}
push: ${{ inputs.push }}
tags: ${{ inputs.registry }}/${{ inputs.namespace }}/${{ inputs.name }}:${{ inputs.tag }}
labels: ${{ inputs.labels }}
cache-from: type=gha,scope=${{ inputs.name }}
cache-to: type=gha,mode=max,scope=${{ inputs.name }}
no-cache: ${{ inputs.no-cache }}
build-args: ${{ inputs.build-args }}
file: ${{ env.FILE }}
secrets: ${{ inputs.secrets }}