2

Setup Container Registry Action

 1 year ago
source link: https://sgitario.github.io/github-action-setup-container-registry/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Setup Container Registry Action

I’m pleased to announce my first GitHub action (https://github.com/marketplace/actions/setup-container-registry)[https://github.com/marketplace/actions/setup-container-registry]!

This action setups the Docker Registry with a single GitHub Action!

on: [push]
jobs:
  simple:
    name: Simple Workflow
    runs-on: ubuntu-latest
    steps:
      - id: registry
        uses: Sgitario/setup-container-registry@v1
      - name: Usage
        run: |
          # You can access the container registry via:
          # - Environment Variable: $CONTAINER_REGISTRY_URL
          # - Output: $       

Why do we need this action?

Normally, you first build your container, and then you verify the image by running end-to-end tests. This already works if you run the images locally. However, if what you want is to test the image in a cluster environment like Kind or OpenShift, you need the containers up and running in a registry and here is when it comes to playing this action :)

Conclusion

I wanted to take this opportunity to learn how to implement and publish my custom actions in GitHub and I’m pleased to say that the experience was really easy and straightforward.

[ Containers, GitHub ]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK