Skip to content

cache breaks with private packages #222

Closed
@modosc

Description

@modosc

whenever Gemfile.lock changes, the first action run always fails, but the second succeeds. we've seen this with prs from dependabot as well as prs opened by humans.

if Gemfile.lock does not change then there's no issue.

we have two different workflows with this issue - both are identical except for the last step (bundle exec brakeman -q vs bundle exec rubocop)

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

name: Linter

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          # runs 'bundle install' and caches installed gems automatically
          bundler-cache: true
        env:
          BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.BUNDLE_RUBYGEMS__PKG__GITHUB__COM }}

      - name: Run brakeman
        run: |
          bundle exec brakeman -q

the first run will always fail:
image

but re-running manually always works:
image

failing logs: logs_588.zip
passing logs: logs_779.zip

i can't link to the runs because they're from a private repo, do you need anything else here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions