Builds and pushes a Docker image to the repository's container registry
Find a file
2025-12-30 16:01:14 +01:00
action.yml feat: remove tag refs for branch and sha 2025-12-30 16:01:14 +01:00
README.md feat: initial commit 2025-12-30 15:11:16 +01:00

Docker · Build and Push Image

Builds and pushes a Docker image to the repository's container registry.

Inputs

  • version (required): Semantic version used to tag the image.
  • token (required): Token used to authenticate to the container registry (e.g., ${{ secrets.GITHUB_TOKEN }}).
  • username (optional): Registry username (defaults to the workflow actor).

Usage

jobs:
  release:
    runs-on: "ubuntu-latest"
    steps:
    - name: "Determine release version"
      id: "version"
      uses: "https://git.xiidoz.com/actions/release-determine-next-version@main"

    - name: "Build and push Docker image"
      uses: "https://git.xiidoz.com/actions/docker-build-and-push@main"
      with:
        version: "${{ steps.version.outputs.version }}"
        token: "${{ secrets.PACKAGE_REGISTRY_TOKEN }}"

Note: This action uses Docker Buildx and pushes image tags and labels generated by docker/metadata-action.