-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish docker images to github container registry (ghcr.io) #1259
Comments
Hey @EugenMayer! Yes, we're considering migrating to ghrc.io. PRs are always welcome! |
Great! I am trying to make sense of https://github.com/imgproxy/imgproxy/tree/master/.github and the workflow setup. Are you actually publishing your docker-hub images via actions and if yes, what is https://github.com/imgproxy/imgproxy/tree/master/.github/ci-docker ? |
|
Well considering this, i will not be able to do anything practical then using a PR. export CR_PAT=YOUR_TOKEN
echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin now tag the image export GHCR_TAG=ghcr.io/imgproxy/imgproxy:$TAG
docker tag $HUBIMAGE ghcr.io/imgproxy/imgproxy:$GHCR_TAG
docker push $GHCR_TAG There is not much i can provide here, i have no experience with google runners. Doing the entire thing as github action is trivial. This would be tag-release based and token handling is automatic. name: build-and-push
on:
push:
tags:
- '*'
env:
IMAGE_FQDN: ghcr.io/imgproxy/imgproxy
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
# push only on main
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: |
${{ env.IMAGE_FQDN }}:latest
${{ env.IMAGE_FQDN }}:${{ github.ref_name }}
build-args: |
TRAEFIK_VERSION=${{ github.ref_name }} |
First off, thank you for this awesome project!
I would love to see the image publish on ghrc.io - should i create a PR for that?
Reasoning: rate limits on docker hub apply extra effort and hassle.
The text was updated successfully, but these errors were encountered: