Skip to content

Instantly share code, notes, and snippets.

@ccjmne
Last active February 9, 2022 15:08
Show Gist options
  • Save ccjmne/efe9b5345266549e21060a5326ef7627 to your computer and use it in GitHub Desktop.
Save ccjmne/efe9b5345266549e21060a5326ef7627 to your computer and use it in GitHub Desktop.

Create a Personal Access Token

  1. Navigate to your Personal Access Tokens
  2. Create a new Access Token with the following authorisations:
    • read:packages
    • write:packages
    • delete:packages
$ echo "aiwi8esgykxcu1t686p_7ea_l6abwc76vue0kecq" | docker login ghcr.io -u ccjmne --password-stdin

Use Docker login command

... where:

  1. ccjmne would be your username
  2. aiwi8esgykxcu1t686p_7ea_l6abwc76vue0kecq would be your Personal Access Token.

PS: I'm not an idiot, that merely is a randomised chain of 40 characters, not my token :)

Publish to GitHub Container Registry

$ docker build . \
   -t puppeteer-html2pdf:1.4.0 \
   -t ghcr.io/ccjmne/puppeteer-html2pdf:1.4.0

$ docker image push ghcr.io/ccjmne/puppeteer-html2pdf:1.4.0

... where:

  1. ccjmne is your username
  2. puppeteer-html2pdf is the name of your repository
  3. 1.4.0 is the desired version number. You may want to also push latest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment