GithubHelp home page GithubHelp logo

classicvalues / podman-login Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhat-actions/podman-login

0.0 1.0 0.0 138 KB

GitHub Action to log into a container image registry. For use with podman, buildah, and skopeo.

Home Page: https://github.com/marketplace/actions/podman-login

License: MIT License

JavaScript 1.32% Shell 5.04% TypeScript 93.64%

podman-login's Introduction

podman-login

CI checks Test Login and Pull Link checker

tag badge license badge size badge

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.

Also see push-to-registry and buildah-build for related actions that can make use of this authentication.

This action only runs on Linux, as it uses podman to perform the log in. GitHub's Ubuntu action runners come with Podman preinstalled. If you are not using those runners, you must first install Podman.

Action Inputs

Input Name Description Default
registry Hostname/domain of the container image registry such as quay.io, docker.io. 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
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

Examples

The example below shows how the podman-login action can be used to log in to quay.io container image registry.

name: Log in to Quay.io
on:
  push:

env:
  REGISTRY_USER: quayuser
  IMAGE_REGISTRY: quay.io
  REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

jobs:
  login:
    name: Log in to image registry
    runs-on: ubuntu-20.04
    steps:

      - name: Log in to Quay.io
        uses: redhat-actions/podman-login@v1
        with:
          username: ${{ env.REGISTRY_USER }}
          password: ${{ env.REGISTRY_PASSWORD }}
          registry: ${{ env.IMAGE_REGISTRY }}

  # Now you can push images, and pull private ones, from quay.io as 'quayuser'.

Logging into GitHub's container registry is just as easy:

name: Log in to ghcr.io
on:
  push:

env:
  REGISTRY_USER: ${{ github.actor }}
  REGISTRY_PASSWORD: ${{ github.token }}
  IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
  login:
    name: Log in to GitHub Container Registry
    runs-on: ubuntu-20.04
    steps:
      - name: Log in to ghcr.io
        uses: redhat-actions/podman-login@v1
        with:
          username: ${{ env.REGISTRY_USER }}
          password: ${{ env.REGISTRY_PASSWORD }}
          registry: ${{ env.IMAGE_REGISTRY }}

  # Now you can push images, and pull private ones, from ghcr.io.

Refer to the GitHub documentation for information about the github context object.

podman-login's People

Contributors

divyansh42 avatar tetchel avatar dependabot[bot] avatar smac89 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.