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
- Host: GitHub
- URL: https://github.com/prompt/actions-push-oci-archive-to-registry
- Owner: prompt
- License: mit
- Created: 2021-05-31T21:29:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-31T23:47:27.000Z (over 4 years ago)
- Last Synced: 2025-04-02T20:56:52.103Z (9 months ago)
- Topics: docker, github-actions, github-actions-docker
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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