-
Add possibility to pass a Personal Access Token to authenticate to GitHub Package Registry. |
Beta Was this translation helpful? Give feedback.
Answered by
dentarg
Jul 31, 2023
Replies: 2 comments 4 replies
-
You can just set the Bundler environment variable |
Beta Was this translation helpful? Give feedback.
4 replies
-
Okay, I have tried with the following: - 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 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's an example: https://github.com/84codes/actions/blob/76fd59f31d903b87b2bde515c8171e7ab30fa2ae/.github/workflows/ruby-ci.yml#L60-L66
Looks like you are missing the username when setting
BUNDLE_RUBYGEMS__PKG__GITHUB__COM