Skip to content

prompt/actions-push-oci-archive-to-registry

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/repository1 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

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 }}