docbrown/.github/workflows/dependabot.yml
Joe Doss 67342a4edf
Add github.event.comment.author_association == 'CONTRIBUTOR' to if statement (#11822)
This should be the last PR to get the `/ci` and `/rebase` commands working in
GitHub Actions. The issue is that our membership settings for `forem/forem` have
everyone set to 'CONTRIBUTOR' instead of 'MEMBER' or 'OWNER'.

Adding github.event.comment.author_association == 'CONTRIBUTOR' should fix this
issue.

I also cleaned up all action files to make the main name of the workflow as
succinct as possible to better organize the left menut of the GitHub Actions
page.

This PR won't fix the issues with the "Run forem/build-containers pipeline"
job in buildkite.yml but I will address those issues in another  PR.
2020-12-09 08:36:57 -06:00

45 lines
1.3 KiB
YAML

#Adopted from https://gist.github.com/filipkis/fab89a09f54ffdd8e70c063755e7ce7f
name: Dependabot
on:
push:
branches:
- 'dependabot/bundler/**'
paths:
- 'Gemfile.lock'
jobs:
update-gems:
name: Update gems on Dependabot pull requests
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
- name: Set up Ruby 2.7.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
- name: Installing additional dependencies
run: |
sudo apt-get update
sudo apt-get install postgresql-client libpq-dev libcurl4-openssl-dev
- name: Run bundle install
run: |
gem install bundler
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}