Update docker-image.yml

This commit is contained in:
kromskii2 authored and GitHub committed 2024-11-12 17:04:57 +07:00
1 parent ab53bd898e
commit 76c5fa3b2a
1 file changed
+29 -70
+29 -70
View File
@@ -1,70 +1,29 @@
- name: Build and push Docker images name: Build and Push Docker Images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 on: [push]
uses: docker/build-push-action@v6.9.0
with: jobs:
# List of a customs host-to-IP mapping (e.g., docker:10.180.0.1) build:
add-hosts: # optional runs-on: ubuntu-latest
# List of extra privileged entitlement (e.g., network.host,security.insecure) steps:
allow: # optional - name: Checkout code
# List of annotation to set to the image uses: actions/checkout@v2
annotations: # optional
# List of attestation parameters (e.g., type=sbom,generator=image) - name: Set up Docker Buildx
attests: # optional uses: docker/setup-buildx-action@v1
# List of build-time variables
build-args: # optional - name: Log in to Docker Hub
# List of additional build contexts (e.g., name=path) uses: docker/login-action@v1
build-contexts: # optional with:
# Builder instance username: ${{ secrets.DOCKER_USERNAME }}
builder: # optional password: ${{ secrets.DOCKER_PASSWORD }}
# List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)
cache-from: # optional - name: Build and push Docker images
# List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir) uses: docker/build-push-action@v6.9.0
cache-to: # optional with:
# Optional parent cgroup for the container used in the build context: .
cgroup-parent: # optional file: ./Dockerfile
# Build's context is the set of files located in the specified PATH or URL push: true
context: # optional tags: |
# Path to the Dockerfile user/app:latest
file: # optional user/app:${{ github.sha }}
# List of metadata for an image
labels: # optional
# Load is a shorthand for --output=type=docker
load: # optional, default is false
# Set the networking mode for the RUN instructions during build
network: # optional
# Do not use cache when building the image
no-cache: # optional, default is false
# Do not cache specified stages
no-cache-filters: # optional
# List of output destinations (format: type=local,dest=path)
outputs: # optional
# List of target platforms for build
platforms: # optional
# Generate provenance attestation for the build (shorthand for --attest=type=provenance)
provenance: # optional
# Always attempt to pull all referenced images
pull: # optional, default is false
# Push is a shorthand for --output=type=registry
push: # optional, default is false
# Generate SBOM attestation for the build (shorthand for --attest=type=sbom)
sbom: # optional
# List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)
secrets: # optional
# List of secret env vars to expose to the build (e.g., key=envname, MY_SECRET=MY_ENV_VAR)
secret-envs: # optional
# List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)
secret-files: # optional
# Size of /dev/shm (e.g., 2g)
shm-size: # optional
# List of SSH agent socket or keys to expose to the build
ssh: # optional
# List of tags
tags: # optional
# Sets the target stage to build
target: # optional
# Ulimit options (e.g., nofile=1024:1024)
ulimit: # optional
# GitHub Token used to authenticate against a repository for Git context
github-token: # optional, default is ${{ github.token }}