GitHub

GitHub Actions to build/push a Docker image

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.

GitHub Container Registry

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.