An open API service indexing awesome lists of open source software.

https://github.com/prompt/actions-push-oci-archive-to-registry

:whale: Push an OCI archive to a remote Docker registry
https://github.com/prompt/actions-push-oci-archive-to-registry

docker github-actions github-actions-docker

Last synced: 9 months ago
JSON representation

:whale: Push an OCI archive to a remote Docker registry

Awesome Lists containing this project

README

          

# Push OCI Archive To Registry

A GitHub Action for pushing an OCI archive generated by
[docker/build-push-action] to a remote Docker registry.

```
pr-mpt/actions-push-oci-archive-to-registry@v1
```

## Inputs

| ID | Description | Default | Examples |
| ---- | ----------- | ------- | -------- |
| **`archive`** | **Path to OCI Archive** | **required** | **`image.tar`** |
| `image` | Docker image | `ghcr.io/repository`[1][footnotes/1] | `ghcr.io/pr-mpt/example` `pr-mpt/example` |
| `tag` | Tag for the image | `latest` | `v1.0.0` `sha-${{ github.sha }}` |

1 `ghcr.io/${{ github.repository }}`

## Outputs

No outputs.

## Build and push multi-platform to remote registry from archive

```yaml
jobs:
build-image:
runs-on: ubuntu-latest
env:
archive: "oci-image.tar"
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v1
- name: Build Docker Image
uses: docker/build-push-action@v2
with:
labels: "${{ steps.meta.outputs.labels }}"
outputs: "type=oci,dest=${{ env.archive }}"
tags: "${{ steps.meta.outputs.tags }}"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Log in to GitHub Container Registry as actor
uses: docker/login-action@v1
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GHCR_PAT }}"
- name: Push OCI archive to remote registry
uses: pr-mpt/actions-push-oci-archive-to-registry
with:
archive: ${{ env.archive }}
```

[docker/build-push-action]: https://github.com/docker/build-push-action
[footnotes/1]: #footnotes/1