Skip to content

Commit

Permalink
Run GitHub Actions on PRs
Browse files Browse the repository at this point in the history
Also:

- Set explicit permissions to read for better security
- Update actions

Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
  • Loading branch information
tagliala committed May 22, 2024
1 parent 6a603dc commit 911bbdb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Integration Tests

on: [push]
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
Expand All @@ -11,9 +18,9 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Checkout test app
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: jamesmartin/inline_svg_test_app
ref: ${{ matrix.test-branch }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/rails_6_webpacker_integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Rails 6 Webpacker Integration Tests (unreliable)

on: [push]
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
Expand All @@ -11,9 +18,9 @@ jobs:
test-branch: [rails6-webpacker]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Checkout test app
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: jamesmartin/inline_svg_test_app
ref: ${{ matrix.test-branch }}
Expand Down Expand Up @@ -47,7 +54,7 @@ jobs:
node-version: 16
if: matrix.test-branch == 'rails6-webpacker'
- name: Set up Python 2.7
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '2.7'
- name: Generate Webpacker config
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Ruby

on: [push]
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
Expand Down

0 comments on commit 911bbdb

Please sign in to comment.