Skip to content

Commit

Permalink
fix: dependabot and ci updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arzola committed May 22, 2024
1 parent b2d8a92 commit f3f03ae
Show file tree
Hide file tree
Showing 13 changed files with 126 additions and 255 deletions.
49 changes: 35 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
version: 2
updates:
# Maintain dependencies for npm
- package-ecosystem: "npm"
# Look for `package.json` and `package-lock.json` files in the root directory
# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
# Check for updates weekly
schedule:
interval: "weekly"
allow:
# Allow direct updates only (for packages named in package.json)
- dependency-type: "direct"
# Allow up to 10 open pull requests for npm dependencies
open-pull-requests-limit: 10
open-pull-requests-limit: 5
versioning-strategy: "increase-if-necessary"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
groups:
composer-dependencies:
dependency-type: "production"
composer-dev-dependencies:
dependency-type: "development"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
# Look for `composer.json` and `composer.lock` files in the root directory
# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
# Check for updates weekly
schedule:
interval: "weekly"
allow:
# Allow direct updates only (for packages named in composer.json)
- dependency-type: "direct"
# Allow up to 10 open pull requests for composer dependencies
open-pull-requests-limit: 10
open-pull-requests-limit: 5
versioning-strategy: "increase-if-necessary"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
groups:
npm-dependencies:
dependency-type: "production"
npm-dev-dependencies:
dependency-type: "development"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
groups:
all-github-actions:
patterns:
- ".*"
46 changes: 0 additions & 46 deletions .github/workflows/check-standards.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Prepare Release 🚀

on:
push:
branches:
- dev

jobs:
deploy:
uses: pressbooks/reusable-workflows/.github/workflows/prepare-release.yml@main
secrets: inherit
10 changes: 10 additions & 0 deletions .github/workflows/ensure-npm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Npm build ⚙️

on:
pull_request:
branches: [ dev ]

jobs:
update-npm-build:
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' }}
uses: pressbooks/reusable-workflows/.github/workflows/npm-build.yml@main
149 changes: 0 additions & 149 deletions .github/workflows/run-tests.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Tests 🧪

on:
push:
branches:
- dev
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
plugin-tests:
uses: pressbooks/reusable-workflows/.github/workflows/pb-plugin-tests.yml@main
secrets: inherit
with:
requires_pressbooks: true
use_mariadb: true
trigger_bedrock_updates:
needs: plugin-tests
runs-on: ubuntu-latest
steps:
- name: Trigger Bedrock Updates
if: github.ref == 'refs/heads/dev'
uses: pressbooks/composer-autoupdate-bedrock@main
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SNS_ARN_DEV: ${{ secrets.AWS_SNS_ARN_DEV }}
AWS_SNS_ARN_STAGING: ${{ secrets.AWS_SNS_ARN_STAGING }}
INPUT_TRIGGERED_BY: ${{ github.repository }}
REF: ${{ github.ref }}
8 changes: 4 additions & 4 deletions .github/workflows/update-mo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Update .mo files
name: Update .mo files 🌐

on:
pull_request:
branches: [ dev ]
branches: [dev]
paths:
- 'languages/*.po'
- "languages/*.po"
workflow_dispatch:

jobs:
update-mo-files:
uses: pressbooks/reusable-workflows/.github/workflows/update-mo.yml@dev
uses: pressbooks/reusable-workflows/.github/workflows/update-mo.yml@main
50 changes: 13 additions & 37 deletions .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
name: Update POT file
name: Update .pot file 🌐

on:
push:
branches:
- dev
pull_request:
branches: [dev]
paths:
- '**.php'
- '**.js'
- "**.php"
- "**.js"
workflow_dispatch:

jobs:
update-pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer, wp-cli/wp-cli-bundle
- name: Update POT file
run: wp i18n make-pot . languages/pressbooks-multi-institution.pot --domain=pressbooks-multi-institution --slug=pressbooks-multi-institution --package-name="Pressbooks Multi Institution" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-multi-institution/issues\"}"
- name: Create Pull Request for POT file
id: cprpot
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
labels: automerge-pot
commit-message: 'chore(l10n): update pot file'
title: 'chore(l10n): update pot file'
body: 'This pull request updates the POT file for this plugin.'
branch: chore/update-pot-file
- name: Merge pull request with updated POT file
if: ${{ steps.cprpot.outputs.pull-request-number }}
uses: "pascalgn/automerge-action@v0.16.2"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: automerge-pot
MERGE_METHOD: squash
PULL_REQUEST: "${{ steps.cprpot.outputs.pull-request-number }}"
update-pot-file:
uses: pressbooks/reusable-workflows/.github/workflows/update-pot.yml@main
secrets: inherit
with:
domain: "pressbooks-multi-institution"
slug: "pressbooks-multi-institution"
package_name: "Pressbooks Shared Network"
headers: '{"Report-Msgid-Bugs-To": "https://github.com/pressbooks/pressbooks-multi-institution/issues"}'
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
Loading

0 comments on commit f3f03ae

Please sign in to comment.