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

fix: dependabot and ci updates #389

Merged
merged 3 commits into from
May 30, 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
49 changes: 31 additions & 18 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 daily
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 daily
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: "monthly"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 10
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
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
125 changes: 0 additions & 125 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
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-network-catalog.pot --domain=pressbooks-network-catalog --slug=pressbooks-network-catalog --package-name="Pressbooks Network Catalog" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-network-catalog/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-network-catalog"
slug: "pressbooks-network-catalog"
package_name: "Pressbooks Network Catalog"
headers: '{"Report-Msgid-Bugs-To": "https://github.com/pressbooks/pressbooks-network-catalog/issues"}'
Loading