Giter Site home page Giter Site logo

dinushchathurya / push-docker-image-to-github-container-registry-using-github-action Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 69 KB

Automatically Publish Docker Image to GitHub Container Registry

Dockerfile 44.68% JavaScript 55.32%
docker github github-packages publish-docker-images dinush dinush-chathurya dinushchathurya ghcr ghcr-hosted github-container-registry

push-docker-image-to-github-container-registry-using-github-action's Introduction

Publish Docker Image to GitHub Container Registry

In here, the following workflow can use to publish the docker image to GitHub Container Registry (GCR) using GitHub Action. This GitHub action will be triggered every time a new Git tag is pushed to the GitHub repository.

Create Environment Variables

1.Create GitHub Personal Access Token in your profile developer settings page. Select following scopes:

  • repo
  • read:packages
  • write:packages

  • 2.Go to your GitHub repositorie's Settings => Secrets => Actions and create New Repsitory Secret. Name it GHCR_PAT and set the value to your created YOUR ACCESS TOKEN.

    Publish new Docker Image with version number

    As usual, stage your changes and then commit them. Then, run the folowing commands:

    git tag <your_tag> 
    

    Then run the following command to push changes to GitHub repository:

    git push origin <tag_name>
    

    The following workflow is designed to be triggered when a new Git tag is pushed project repository. Using the workflow, you can perform pushes to the repository (git push) without triggering this workflow. For example, when updating the project’s README file, you can run the following command:

    git push <branch_name>
    

    push-docker-image-to-github-container-registry-using-github-action's People

    Contributors

    devdinush avatar dinushchathurya avatar

    Watchers

     avatar

    Forkers

    devdinush

    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.