Skip to content

Commit

Permalink
Merge pull request #156 from lcobucci/automate-more-tasks
Browse files Browse the repository at this point in the history
Automate more tasks
  • Loading branch information
lcobucci authored Feb 6, 2021
2 parents 6f3ae0d + b04a960 commit 9997146
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 22 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "06:00"
reviewers:
- lcobucci
versioning-strategy: increase
open-pull-requests-limit: 20
allow:
- dependency-type: all
labels: ["Dependencies"]
39 changes: 39 additions & 0 deletions .github/workflows/merge-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Merge me!

on:
check_suite:
types:
- completed
pull_request:
types:
- edited
- labeled
- opened
- ready_for_review
- reopened
- synchronize
- unlabeled
- unlocked

jobs:
merge-me:
name: Merge me!
runs-on: ubuntu-latest
steps:
- name: Merge me!
uses: ridedott/merge-me-action@v1
with:
# Depending on branch protection rules, a manually populated
# `GITHUB_TOKEN_WORKAROUND` environment variable with permissions to
# push to a protected branch must be used. This variable can have an
# arbitrary name, as an example, this repository uses
# `GITHUB_TOKEN_DOTTBOTT`.
#
# When using a custom token, it is recommended to leave the following
# comment for other developers to be aware of the reasoning behind it:
#
# This must be used as GitHub Actions token does not support
# pushing to protected branches.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_LOGIN: dependabot[bot]
MERGE_METHOD: MERGE
3 changes: 2 additions & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- "development"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.0"
- "8.1"
operating-system:
- "ubuntu-latest"

Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
Loading

0 comments on commit 9997146

Please sign in to comment.