Readme update and action.yml refactor

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-04-09 12:57:09 +05:30
parent 805221f355
commit 22deeeef6a
6 changed files with 26 additions and 19 deletions

4
CHANGELOG.md Normal file
View file

@ -0,0 +1,4 @@
# podman-login Changelog
## v1
Initial Release

View file

@ -1,4 +1,4 @@
# buildah-build # podman-login
[![CI checks](https://github.com/redhat-actions/podman-login/workflows/CI%20checks/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3A%22CI+checks%22) [![CI checks](https://github.com/redhat-actions/podman-login/workflows/CI%20checks/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3A%22CI+checks%22)
[![Build](https://github.com/redhat-actions/podman-login/workflows/Test%20Login/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3ABuild) [![Build](https://github.com/redhat-actions/podman-login/workflows/Test%20Login/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3ABuild)
[![Link checker](https://github.com/redhat-actions/podman-login/workflows/Link%20checker/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3A%22Link+checker%22) [![Link checker](https://github.com/redhat-actions/podman-login/workflows/Link%20checker/badge.svg)](https://github.com/redhat-actions/podman-login/actions?query=workflow%3A%22Link+checker%22)
@ -12,9 +12,9 @@ Podman Login is a GitHub Action to log in to a container image registry.
After logging in, you can work with the registry as an authenticated user, performing actions such as pushing an image, or pulling a private image. On GitHub runners, the authentication will be deleted at the end of each job as the workspace is cleaned up. After logging in, you can work with the registry as an authenticated user, performing actions such as pushing an image, or pulling a private image. On GitHub runners, the authentication will be deleted at the end of each job as the workspace is cleaned up.
Also see [push-to-registry](https://github.com/redhat-actions/push-to-registry) and [buildah-build](https://github.com/redhat-actions/buildah-build) for related actions that can make use of this authentication. Also see **[push-to-registry](https://github.com/redhat-actions/push-to-registry)** and **[buildah-build](https://github.com/redhat-actions/buildah-build)** for related actions that can make use of this authentication.
This action only runs on Linux, as it uses [podman](https://github.com/containers/Podman) to perform the login. [GitHub's Ubuntu action runners](https://github.com/actions/virtual-environments#available-environments) come with Podman preinstalled. If you are not using those runners, you must first [install Podman](https://podman.io/getting-started/installation). This action only runs on `Linux`, as it uses [podman](https://github.com/containers/Podman) to perform the log in. [GitHub's Ubuntu action runners](https://github.com/actions/virtual-environments#available-environments) come with Podman preinstalled. If you are not using those runners, you must first [install Podman](https://podman.io/getting-started/installation).
<a id="action-inputs"></a> <a id="action-inputs"></a>
@ -23,16 +23,16 @@ This action only runs on Linux, as it uses [podman](https://github.com/container
| Input Name | Description | Default | | Input Name | Description | Default |
| ---------- | ----------- | ------- | | ---------- | ----------- | ------- |
| registry | Hostname/domain of the container image registry such as `quay.io`, `docker.io`. | **Must be provided** | registry | Hostname/domain of the container image registry such as `quay.io`, `docker.io`. | **Must be provided**
| username | Username to login against the container image registry. | **Must be provided** | username | Username to log in against the container image registry. | **Must be provided**
| password | Password, encrypted password, or access token for `username`. | **Must be provided** | password | Password, encrypted password, or access token for `username`. | **Must be provided**
| logout | By default, the action logs out of the container image registry at the end of the job (for self-hosted runners). Set this to `false` to disable this behaviour. | `true` | logout | By default, the action logs out of the container image registry at the end of the job (for self-hosted runners). Set this to `false` to disable this behaviour. | `true`
## Example ## Example
The example below shows how the `podman-login` action can be used to login to `quay.io` container image registry. The example below shows how the `podman-login` action can be used to log in to `quay.io` container image registry.
```yaml ```yaml
name: Login to Quay.io name: Log in to Quay.io
on: on:
push: push:
@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Login to Quay.io - name: Log in to Quay.io
uses: redhat-actions/podman-login@v1 uses: redhat-actions/podman-login@v1
with: with:
username: ${{ env.REGISTRY_USER }} username: ${{ env.REGISTRY_USER }}

View file

@ -1,21 +1,23 @@
name: 'Podman login' name: 'Podman Login'
description: 'GitHub Action to login against a container image registry' description: 'Log into a container image registry'
author: 'Red Hat' author: 'Red Hat'
branding: branding:
icon: circle icon: circle
color: red color: red
inputs: inputs:
registry: registry:
description: 'Server URL of the container image registry' description: 'Hostname/domain of the container image registry such as quay.io, docker.io'
required: true required: true
username: username:
description: 'Username to login against the container image registry' description: 'Username to log in against the container image registry'
required: true required: true
password: password:
description: 'Password or token to login against the container image registry' description: 'Password, encrypted password, or access token for username'
required: true required: true
logout: logout:
description: 'Set to false if you do not want to logout at the end of the job' description: |
'By default, the action logs out of the container image registry at the end
of the job (for self-hosted runners). Set this to false to disable this behaviour'
required: false required: false
default: 'true' default: 'true'

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
"engines": { "engines": {
"node": "12" "node": "12"
}, },
"description": "GitHub Action to login against a container image registry", "description": "GitHub Action to log in against a container image registry",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/redhat-actions/podman-login" "url": "https://github.com/redhat-actions/podman-login"

View file

@ -1,25 +1,26 @@
// This file was auto-generated by action-io-generator. Do not edit by hand! // This file was auto-generated by action-io-generator. Do not edit by hand!
export enum Inputs { export enum Inputs {
/** /**
* Set to false if you do not want to logout at the end of the job * 'By default, the action logs out of the container image registry at the end
* of the job (for self-hosted runners). Set this to false to disable this behaviour'
* Required: false * Required: false
* Default: "true" * Default: "true"
*/ */
LOGOUT = "logout", LOGOUT = "logout",
/** /**
* Password or token to login against the container image registry * Password, encrypted password, or access token for username
* Required: true * Required: true
* Default: None. * Default: None.
*/ */
PASSWORD = "password", PASSWORD = "password",
/** /**
* Server URL of the container image registry * Hostname/domain of the container image registry such as quay.io, docker.io
* Required: true * Required: true
* Default: None. * Default: None.
*/ */
REGISTRY = "registry", REGISTRY = "registry",
/** /**
* Username to login against the container image registry * Username to log in against the container image registry
* Required: true * Required: true
* Default: None. * Default: None.
*/ */