Skip to content

Commit

Permalink
fix: dependabot and ci updates (#164)
Browse files Browse the repository at this point in the history
* fix: dependabot and ci updates

* ci: update ensure-npm-build.yml

* Update ensure-npm-build.yml
  • Loading branch information
arzola authored May 30, 2024
1 parent 844bd07 commit 7601775
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 260 deletions.
47 changes: 30 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,35 +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"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 10
open-pull-requests-limit: 5
groups:
all-github-actions:
patterns:
- ".*"
12 changes: 0 additions & 12 deletions .github/workflows/build-and-lint.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
12 changes: 12 additions & 0 deletions .github/workflows/ensure-npm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Npm build ⚙️

on:
pull_request:
branches: [dev]
paths:
- "assets/**/*"

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

This file was deleted.

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: 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
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
48 changes: 13 additions & 35 deletions .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
@@ -1,41 +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
- 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-cas-sso.pot --domain=pressbooks-cas-sso --slug=pressbooks-cas-sso --package-name="Pressbooks CAS Single Sign-On" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-cas-sso/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/[email protected]"
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-cas-sso"
slug: "pressbooks-cas-sso"
package_name: "Pressbooks CAS SSO"
headers: '{"Report-Msgid-Bugs-To": "https://github.com/pressbooks/pressbooks-cas-sso/issues"}'
44 changes: 0 additions & 44 deletions .github/workflows/update-translations.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
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 @@
{
".": "2.4.0"
}
Loading

0 comments on commit 7601775

Please sign in to comment.