Skip to content

Commit

Permalink
Merge pull request #1058 from lsst-it/maint/gha
Browse files Browse the repository at this point in the history
(gha) update workflows to allow branch push or PR
  • Loading branch information
jhoblitt authored Feb 20, 2024
2 parents 8535883 + 8f4a904 commit ae9c875
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 32 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/arborist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ name: Arborist
"on":
- create
- delete
- pull_request
- push

permissions:
contents: write
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/block_merge_commits.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
name: "Block Merge Commits"
# yamllint disable rule:quoted-strings
name: Block Merge Commits

"on": "pull_request"
"on": pull_request

jobs:
message-check:
name: "Block Merge Commits"
name: Block Merge Commits

runs-on: "ubuntu-latest"
runs-on: ubuntu-latest

steps:
- name: "Block Merge Commits"
uses: "Morishiri/[email protected]"
- name: Block Merge Commits
uses: Morishiri/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
26 changes: 13 additions & 13 deletions .github/workflows/commit_messages.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
name: 'Commit Message Check'
# yamllint disable rule:quoted-strings
name: Commit Message Check

"on":
- "push"
"on": pull_request

jobs:
check-commit-message:
name: "Check Commit Message"
runs-on: "ubuntu-latest"
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: "Check Commit Type"
uses: "gsactions/commit-message-checker@v2"
- name: Check Commit Type
uses: gsactions/commit-message-checker@v2
with:
pattern: '\([^)]+\) .+$'
flags: "gm"
error: "Your first line has to contain a commit type like '(role/foo)'."
flags: gm
error: Your first line has to contain a commit type like '(role/foo)'.
checkAllCommitMessages: "true"
accessToken: "${{ secrets.GITHUB_TOKEN }}"
- name: "Check Line Length"
uses: "gsactions/commit-message-checker@v2"
- name: Check Line Length
uses: gsactions/commit-message-checker@v2
with:
pattern: "^(?!.{73})"
error: "The maximum line length of 72 characters is exceeded."
pattern: '^(?!.{73})'
error: The maximum line length of 72 characters is exceeded.
checkAllCommitMessages: "true"
accessToken: "${{ secrets.GITHUB_TOKEN }}"
6 changes: 5 additions & 1 deletion .github/workflows/librarian_puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: librarian-puppet

"on":
- push
push:
branches:
- production
- cp_production
pull_request:

jobs:
librarian_puppet:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: markdownlint

"on":
- push
push:
branches:
- production
- cp_production
pull_request:

jobs:
markdownlint:
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/pr_labels.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
---
name: "Pull Request Labels"
# yamllint disable rule:quoted-strings
name: Pull Request Labels

"on":
pull_request:
types: ["opened", "labeled", "unlabeled", "synchronize"]
types:
- opened
- labeled
- unlabeled
- synchronize

jobs:
label:
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
steps:
- uses: "mheap/github-action-required-labels@v3"
- uses: mheap/github-action-required-labels@v3
with:
mode: "exactly"
mode: exactly
count: 1
labels: "enhancement, bug, skip-changelog"
labels: enhancement, bug, skip-changelog
6 changes: 5 additions & 1 deletion .github/workflows/rake_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: rake checks

"on":
- push
push:
branches:
- production
- cp_production
pull_request:

jobs:
rake_checks:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/shellcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: shellcheck

"on":
- push
push:
branches:
- production
- cp_production
pull_request:

jobs:
shellcheck:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: yamllint

"on":
- push
push:
branches:
- production
- cp_production
pull_request:

jobs:
yamllint:
Expand Down

0 comments on commit ae9c875

Please sign in to comment.