Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
package

GitHub Action

regctl-installer

v2.0.0

regctl-installer

package

regctl-installer

GitHub Action for installing the regctl CLI tool

Installation

Copy and paste the following snippet into your .yml file.

              

- name: regctl-installer

uses: IAreKyleW00t/[email protected]

Learn more about this action in IAreKyleW00t/regctl-installer

Choose a version

📦 regctl-installer

GitHub Marketplace GitHub tag (latest SemVer) Action Tests License Dependabot

This GitHub Action enables you to interacting with remote images and registries using regctl. This action will verify the integrity of the regctl release during installation if you setup Cosign ahead of time (see examples below) and as well as cache the regctl binary for future runs using the actions/cache Action.

For a quick start guide on the usage of regctl, please refer to https://github.com/regclient/regclient/blob/main/docs/regctl.md. For available regctl releases, see https://github.com/regclient/regclient/releases.

This action supports Linux, macOS and Windows runners (results may vary with self-hosted runners).

Quick Start

- name: Install regctl
  uses: iarekylew00t/regctl-installer@v2

Usage

Important

You need to authenticate into registries using either the docker/login-action Action or by manually configuring credentials in within regctl itself. See the Examples section for details on how to do this.

Inputs

Name Type Description Default
regctl-release String regctl version to be installed latest
install-dir String directory to install regctl binary into $HOME/.regctl
cache Boolean Cache the regctl binary true
verify Boolean Perform cosign validation on regctl binary [1] true
token String GitHub Token for API access ${{ github.token }}
  1. cosign must be in your PATH for validation to work. It will be skipped if it's not present; See Automatic validation with Cosign. The verify input is if you want explicitly skip the verification step when it would run.

Outputs

Name Type Description
version String The version of regctl the was installed
cache-hit Boolean If the regctl binary was loaded via cache

Token Permissions

This Actions requires the following permissions granted to the GITHUB_TOKEN.

Examples

Pinned version

- name: Install regctl
  uses: iarekylew00t/regctl-installer@v2
  with:
    regctl-release: v0.7.1

Authenticate using Docker credentials

- name: Install regctl
  uses: iarekylew00t/regctl-installer@v2

- name: Login to DockerHub
  uses: docker/login-action@v3
  with:
    username: ${{ secrets.DOCKERHUB_USERNAME }}
    password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
  uses: docker/login-action@v3
  with:
    registry: ghcr.io
    username: ${{ github.actor }}
    password: ${{ github.token }}

Authenticate using regctl

- name: Install regctl
  uses: iarekylew00t/regctl-installer@v2

- name: Login to DockerHub
  run: |
    echo "${{ secrets.DOCKERHUB_TOKEN }}" | \
    regctl registry login docker.io \
      --user "${{ vars.DOCKERHUB_USERNAME }}" \
      --pass-stdin

- name: Login to GHCR
  run: |
    echo "${{ github.token }}" | \
    regctl registry login ghcr.io \
      --user "${{ github.actor }}" \
      --pass-stdin

Automatic validation with Cosign

- name: Install Cosign
  uses: sigstore/[email protected]

- name: Install regctl
  uses: iarekylew00t/regctl-installer@v2

Contributing

Feel free to contribute and make things better by opening an Issue or Pull Request.

License

See LICENSE.