Skip to content

Commit

Permalink
Merge pull request #28 from RockefellerArchiveCenter/workflow-updates
Browse files Browse the repository at this point in the history
add GHA workflows
  • Loading branch information
p-galligan authored Nov 15, 2024
2 parents 726812f + ae2a0c6 commit 9651df2
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 21 deletions.
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.

0 comments on commit 9651df2

Please sign in to comment.