Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add GHA workflows #28

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
ref: base
token: ${{ steps.app-token.outputs.token }}
ref: development
persist-credentials: false

- uses: ruby/setup-ruby@v1
with:
Expand All @@ -26,8 +34,8 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: base
token: ${{ steps.app-token.outputs.token }}
base: development
branch: dependency-updates
delete-branch: true
title: Dependency Updates
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Check Branch'

on:
pull_request:
branches:
- base

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.head_ref != 'development'
run: |
echo "ERROR: You can only merge to base from the development branch."
exit 1
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
pull_request:
branches:
- development

jobs:
build:
runs-on: ubuntu-latest
env:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby 3.1.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.3
bundler-cache: true

- name: Install additional packages
run: sudo apt-get install -y libcurl4-openssl-dev

- name: Install dependencies
run: bundle install

- name: Run cibuild
run: ./script/cibuild
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.