ruby / setup-ruby

An action to download a prebuilt Ruby and add it to the PATH in 5 seconds

Home Page:https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authenticate to GH Package Registry

kimegede opened this issue · comments

Add possibility to pass a Personal Access Token to authenticate to GitHub Package Registry.

You can just set the Bundler environment variable

Okay, I have tried with the following:
But still required token it set.

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
        env:
          BUNDLE_GITHUB__COM: ${{ secrets.GH_PACKAGE_TOKEN }}:x-oauth-basic
          BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.GH_PACKAGE_TOKEN }}

Currently using:

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7

      - name: Install dependencies
        run: |
          bundle config set --global rubygems.pkg.github.com ${{ secrets.GH_PACKAGE_TOKEN }}:x-oauth-basic
          gem install bundler
          bundle install --jobs 4 --retry 3

@dentarg can you tell what I should do instead?

@dtu96303e not sure I understand :D