From a607cbbf4126ce40598fbbe0b7dfeda27d4ca368 Mon Sep 17 00:00:00 2001 From: Joe Doss Date: Thu, 28 May 2020 12:15:43 -0500 Subject: [PATCH] Update vendor/cache After Dependabot (#8135) * Create dependabot.yml with bundle config cache_all_platforms true bundle config set cache_all true so we cache gems in the workflow. --- .github/workflows/dependabot.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 000000000..82d80fff7 --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,38 @@ +#Adopted from https://gist.github.com/filipkis/fab89a09f54ffdd8e70c063755e7ce7f + +name: Update vendor/cache After Dependabot + +on: + push: + branches: + - 'dependabot/bundler/**' + paths: + - 'Gemfile.lock' + +jobs: + update-gems: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 2.7 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.1 + - name: Installing additional dependencies + run: | + sudo apt-get install postgresql-client libpq-dev + - name: Bundle install + run: | + gem install bundler --no-rdoc --no-ri + bundle config set cache_all true + bundle config cache_all_platforms true + bundle install + - name: Commit and push + run: | + git config --local user.email `git show -s --format='%ae'` + git config --local user.name ${GITHUB_ACTOR} + git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" + git add . + git commit -m "`git log --oneline --format=%B -n 1 HEAD | head -n 1` (Update vendor/cache)" || true + git push github HEAD:${GITHUB_REF}