https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
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: ghcr.io 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: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: ${{ env.
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
TL;DR Get an acccces token (Personal Access Token) https://github.com/settings/tokens/new 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 ghcr.io. export CR_PAT=ghp_abcdefghijklMNOpqrstuvwxyz0123456789 echo $CR_PAT | docker login ghcr.io -u atlex00 --password-stdin docker tag {{ my_local_image_id }} ghcr.io/atlex00/my-test docker push ghcr.io/atlex00/my-test How to delete https://docs.github.com/en/packages/learn-github-packages/deleting-and-restoring-a-package
My real case Migrate repository from BitBucket to GitHub. I could delete Commit histories. What I’ve done Update .gitignore. Delete docs directory. Update netlify.toml [build] publish = "docs" command = "hugo --gc --minify" [context.production.environment] HUGO_VERSION = "0.87.0" rm -rf data #old dir structure rm -rf .git rm -rf theme/mainroad git init git submodule add git@github.com:Vimux/Mainroad.git themes/mainroad git config --global user.name atlex00 git config --global user.email ... git commit git push origin master --force