mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
build-push-action uses Git context by default. No need for checkout action unless you tamper with repo files before build. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
984 B
984 B
title, description, keywords
| title | description | keywords |
|---|---|---|
| Local registry with GitHub Actions | Create and use a local OCI registry with GitHub Actions | ci, github actions, gha, buildkit, buildx, registry |
For testing purposes you may need to create a local registry to push images into:
name: ci
on:
push:
jobs:
docker:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build and push to local registry
uses: docker/build-push-action@v6
with:
push: true
tags: localhost:5000/name/app:latest
- name: Inspect
run: |
docker buildx imagetools inspect localhost:5000/name/app:latest