Update docker-image.yml

This commit is contained in:
kromskii2 authored and GitHub committed 2024-11-12 17:03:12 +07:00
1 parent 6f407ce163
commit ab53bd898e
1 file changed
+70 -64
+70 -64
View File
@@ -1,64 +1,70 @@
# Этот рабочий процесс использует действия, которые не сертифицированы GitHub. - name: Build and push Docker images
# Они предоставляются сторонним поставщиком, и на них распространяются # You may pin to the exact commit or the version.
# отдельные условия обслуживания, политика конфиденциальности и поддержка # uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
# документации. uses: docker/build-push-action@v6.9.0
with:
# GitHub рекомендует закрепить действия в фиксации SHA. # List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)
# Чтобы получить более новую версию, потребуется обновить SHA. add-hosts: # optional
# Вы также можете ссылаться на тег или ветвь, однако действие может измениться без предупреждения. # List of extra privileged entitlement (e.g., network.host,security.insecure)
allow: # optional
name: Publish Docker image # List of annotation to set to the image
annotations: # optional
on: # List of attestation parameters (e.g., type=sbom,generator=image)
release: attests: # optional
types: [published] # List of build-time variables
build-args: # optional
jobs: # List of additional build contexts (e.g., name=path)
push_to_registries: build-contexts: # optional
name: Push Docker image to multiple registries # Builder instance
runs-on: ubuntu-latest builder: # optional
permissions: # List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)
packages: write cache-from: # optional
contents: read # List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)
attestations: write cache-to: # optional
id-token: write # Optional parent cgroup for the container used in the build
steps: cgroup-parent: # optional
- name: Check out the repo # Build's context is the set of files located in the specified PATH or URL
uses: actions/checkout@v4 context: # optional
# Path to the Dockerfile
- name: Log in to Docker Hub file: # optional
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # List of metadata for an image
with: labels: # optional
username: ${{ secrets.DOCKER_USERNAME }} # Load is a shorthand for --output=type=docker
password: ${{ secrets.DOCKER_PASSWORD }} load: # optional, default is false
# Set the networking mode for the RUN instructions during build
- name: Log in to the Container registry network: # optional
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 # Do not use cache when building the image
with: no-cache: # optional, default is false
registry: ghcr.io # Do not cache specified stages
username: ${{ github.actor }} no-cache-filters: # optional
password: ${{ secrets.GITHUB_TOKEN }} # List of output destinations (format: type=local,dest=path)
outputs: # optional
- name: Extract metadata (tags, labels) for Docker # List of target platforms for build
id: meta platforms: # optional
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 # Generate provenance attestation for the build (shorthand for --attest=type=provenance)
with: provenance: # optional
images: | # Always attempt to pull all referenced images
my-docker-hub-namespace/my-docker-hub-repository pull: # optional, default is false
ghcr.io/${{ github.repository }} # Push is a shorthand for --output=type=registry
push: # optional, default is false
- name: Build and push Docker images # Generate SBOM attestation for the build (shorthand for --attest=type=sbom)
id: push sbom: # optional
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)
with: secrets: # optional
context: . # List of secret env vars to expose to the build (e.g., key=envname, MY_SECRET=MY_ENV_VAR)
push: true secret-envs: # optional
tags: ${{ steps.meta.outputs.tags }} # List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)
labels: ${{ steps.meta.outputs.labels }} secret-files: # optional
# Size of /dev/shm (e.g., 2g)
- name: Generate artifact attestation shm-size: # optional
uses: actions/attest-build-provenance@v1 # List of SSH agent socket or keys to expose to the build
with: ssh: # optional
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} # List of tags
subject-digest: ${{ steps.push.outputs.digest }} tags: # optional
push-to-registry: true # 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 }}