GitHub Action
regctl-installer
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).
- name: Install regctl
uses: iarekylew00t/regctl-installer@v2
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.
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 }} |
cosign
must be in yourPATH
for validation to work. It will be skipped if it's not present; See Automatic validation with Cosign. Theverify
input is if you want explicitly skip the verification step when it would run.
Name | Type | Description |
---|---|---|
version |
String | The version of regctl the was installed |
cache-hit |
Boolean | If the regctl binary was loaded via cache |
This Actions requires the following permissions granted to the GITHUB_TOKEN.
packages: write
(Only needed if you plan to use GitHub Container Registry)
- name: Install regctl
uses: iarekylew00t/regctl-installer@v2
with:
regctl-release: v0.7.1
- 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 }}
- 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
- name: Install Cosign
uses: sigstore/[email protected]
- name: Install regctl
uses: iarekylew00t/regctl-installer@v2
Feel free to contribute and make things better by opening an Issue or Pull Request.
See LICENSE.