GitHub Actions to build/push a Docker image TL;DR mkdir -p .github/workflows. vim .github/workflows/deploy-image.yml: name: Create and publish a Docker image on: push: branches: ['main'] env: REGISTRY: IMAGE_NAME: ${{ github.repository }} jobs: build-and-push-image: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v2 - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: registry: ${{ env.REGISTRY }} username: ${{ }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: ${{ env.

GitHub Container Registry TL;DR Get an acccces token (Personal Access Token) The only permission required in this post is write:packages. From GitHub point of view, a container in Container Registry is a package. In this post ghp_abcdefghijklMNOpqrstuvwxyz0123456789. Login to the GitHub Container registry export CR_PAT=ghp_abcdefghijklMNOpqrstuvwxyz0123456789 echo $CR_PAT | docker login -u atlex00 --password-stdin docker tag {{ my_local_image_id }} docker push How to delete