Skip to content

Commit

Permalink
Add permissions for running Danger (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Econa77 authored Oct 9, 2023
1 parent 8f8faba commit 074cd6e
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/Danger.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,54 @@
name: Danger

on: pull_request

permissions:
pull-requests: write
jobs:
danger:

runs-on: macos-13

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer

- name: Cache RubyGems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Cache Mint Builds
uses: actions/cache@v1
with:
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-build-${{ env.SWIFTLINT_VERSION }}
restore-keys: |
${{ runner.os }}-mint-build-
${{ runner.os }}-mint-build-
- name: Cache Mint Links
uses: actions/cache@v1
with:
path: ${{ env.MINT_LINK_PATH }}
key: ${{ runner.os }}-mint-link-${{ env.SWIFTLINT_VERSION }}
restore-keys: |
${{ runner.os }}-mint-link-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Install Mint and Packages
run: |
brew install mint
mint install realm/SwiftLint@${{ env.SWIFTLINT_VERSION }}
- name: Run Danger
run: bundle exec danger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
MINT_PATH: ${{ github.workspace }}/mint
MINT_LINK_PATH: ${{ github.workspace }}/mint/bin
Expand Down

0 comments on commit 074cd6e

Please sign in to comment.