fix: add explicit permissions to ci github action #225
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
JRUBY_OPTS: -Xcext.enabled=true | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: "Test / Ruby ${{ matrix.ruby }}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 10 | |
- uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 | |
with: | |
# This should match lib/github/markups.rb GitHub::Markups::MARKUP_RST | |
python-version: '3.x' | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip | |
- name: Install Perl dependencies | |
run: | | |
curl -1sLf \ | |
'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/setup.deb.sh' \ | |
| sudo -E bash | |
sudo apt-get update -qq | |
sudo apt-get install perl rakudo-pkg | |
curl -L http://cpanmin.us | perl - --sudo App::cpanminus | |
sudo cpanm --installdeps --notest Pod::Simple | |
- name: Install Python dependencies | |
run: python -m pip install docutils | |
- name: Run rake | |
run: | | |
export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin | |
bundle exec rake |