We're getting charged for package data transfer out when using with actions

We have some actions that pull Docker images. We recently got notified that we ran out of the free tier data transfer out bandwidth. On the packages feature page it states that you get unlimited data transfer out when using packages with actions. We’re currently only using these images with actions so I know it’s not something else.

You could see the count of downloads of an image in Packages page. Is it bigger than the count of pull operation in your workflow runs?  

If you are using a private repo or you’d prefer, please contact Github Support for your billing issue and they will try to help. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions#contacting-support

Yes, the count of downloads is much higher than the count of pull operations from GitHub Actions would be. However, it’s a number that doesn’t reflect our actual usage. We have two developers and the only operations that pull images (other than downloading to our local machines) are from GitHub Actions. Also, based on the download count, we should be getting charged hundreds of dollars instead of the couple dollars we’re currently at.

I contacted GitHub support yesterday but haven’t heard back yet.

You could go to Organization/account settings > Billing tab to see your Github Packages usage.

As we Community support don’t have permission to check your detail billing information, you may need to wait for Github support teams’ feedback. And, If you get this issue resolved, It would be great if you could share the solution here.

Thanks for the help.

Still haven’t heard back from GitHub support. I’ll make sure to update this thread in the event they respond.

Should the “Current monthly bill” reflect the GitHub Package data transfer out billing? Our “Current monthly bill” only reflects our seat count and does not take into account our GitHub Package billing.

Still nothing from support. I’ve emailed them about a half dozen times at this point.

Screen Shot 2020-01-17 at 11.34.05 AM.png

According toofficial document , We determine you are downloading packages using GitHub Actions when you log in to GitHub Packages using a GITHUB_TOKEN.

Please check your workflow. Do you use GITHUB_TOKEN or a personal access token to pull image?

and is GITHUB_TOKEN supposed to work even when getting a docker image from a different (public) repository?

Yes, pull image from another publlic repo with GITHUB_TOKEN is free . 

As far as I know the GitHub Package Registry doesn’t support pulling private docker images with a GITHUB_TOKEN. You have to use a personal access token.

For instance, this doesn’t work.

name: ci

on: push

jobs:
  docker:
    runs-on: ubuntu-latest

    steps:
      - name: Run docker login

        run: docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} docker.pkg.github.com

      - name: Run docker pull

        run: docker pull docker.pkg.github.com/myorg/myrepo/myimage:0

You get the error:

Error response from daemon: repository docker.pkg.github.com/myorg/myrepo/myimage not found: name unknown: docker package "myimage" does not exist under owner "myorg/myrepo"

If you replace GITHUB_TOKEN with a personal access token with the appropriate permissions it works fine.

There are other threads in the Community Forum regarding this.

The above is specifically for private repositories pulling private images from GitHub Package Registry.

Please ignoe this comment. Can’t delete it.

Yeah, you are right. You need to use personal access token to pull private docker images . 

GitHub Packages usage is free for public packages. For private packages, each GitHub account receives a certain amount of free storage and data transfer, depending on the product used with the account. By default, your account will have a spending limit of $0, which prevents additional usage of storage or data transfer after you reach the included amounts. If you increase your spending limit above the default of $0, you will be billed for any additional storage or data transfer, also called overages, up to your spending limit.

https://help.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages#about-billing-for-github-packages 

Thanks for the feedback!

The features page for the GitHub Package Registry says the exact opposite. The header literally says “Private repositories”. Nowhere does it say free data transer out for actions is a public repository only feature. I’ve included the relevant section from the public marketing site for the package registry. I’m only using the personal access token because using GITHUB_TOKEN is broken. It’s cool if they’re still ironing out the kinks. I’m a developer too so I get it. I do expect them to honor the promise they made on the public marketing site that sold me on switching to GitHub Actions and GitHub Package Registry.

Thank you for pointing this out.

As PAT acts like a user , currently, github actions don’t know where PAT-based access is coming from (Github Action or anywhere else) . So we charged for pull image using PAT.  

I found in our internal channel that Github team are working on a way to exclude using PAT from Github Actions to download packages from Package Data transfer billing. 

By the way, you could describe your scenario in your Support ticket . 

It’s good to know they’re working on a solution for personal access tokens. Add a +1 for me if it helps move it along quicker.

I’ll open a new ticket with support with more detail.

Thanks again for the help. I’ll report back when I have new info.

To note, we did get billed for data transfer out on our last billing cycle. So this is costing us money. I opened a new ticket with GitHub Developer Support detailing this issue and asked for a refund for the amout charged from the data transfer out billing. I’ll report back if I hear anything.

Heard back from support! :tada::tada::tada:

Here are the good bits from the response I got.

The issue you are describing is due to an issue on our side with how Packages bandwidth was being calculated if an action was set up using a Personal Access Token rather than the GITHUB_TOKEN.

 

Our Actions and Packages team has been working on implementing a fix for the issue. We’d hoped to have something out this week, but they’ve hit a few snags and are still working to get things smoothed out.

 

I will follow up with you when I hear that it’s been fixed, and of course we will be glad to refund any errant overages.

Great news! Glad this is getting resolved.

1 Like

More from support.

Great news! The fix for this was released shortly after I replied yesterday, so going forward, this data transfer bandwidth should be calculated correctly.

:tada::tada::tada:

Thanks GitHub for fixing this issue and making things right!

1 Like

Could you clarify if GITHUB_TOKEN is now supposed to work when pulling private images from docker.pkg.github.com?