Skip to content

Commit

Permalink
chore: group dependabot updates when minor/patch
Browse files Browse the repository at this point in the history
leave major dependency updates to their own PR so they stand out and are tested correctly

prefix the PRs with `chore(deps)` to adhere to conventional commits

used [frizbee](https://github.com/stacklok/frizbee)

ran `frizbee ghactions -d .github/workflows` to change from tags to SHAs on github actions
also fixes formatting

Signed-off-by: jmeridth <[email protected]>
  • Loading branch information
jmeridth committed Jun 5, 2024
1 parent 0450977 commit 3229c7b
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 65 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ updates:
- "dependabot"
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore(deps)"
groups:
dependencies:
applies-to: version-updates
update-types:
- "minor"
- "patch"
- package-ecosystem: "bundler"
directory: /
schedule:
Expand All @@ -18,3 +26,11 @@ updates:
- "dependabot"
- "dependencies"
- "bundler"
commit-message:
prefix: "chore(deps)"
groups:
dependencies:
applies-to: version-updates
update-types:
- "minor"
- "patch"
8 changes: 5 additions & 3 deletions .github/workflows/auto-assign-author.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: 'Auto Author Assign'

on:
pull_request_target:
types: [opened, reopened]

permissions:
contents: read
jobs:
assign-author:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
- uses: toshimaru/auto-author-assign@5921acc6d5cdbf184d1c50dd6ee080f10fe1d8f6 # v2.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
38 changes: 15 additions & 23 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: "Custom CodeQL"

on:
workflow_dispatch:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]

branches: ["main"]
permissions:
contents: read

jobs:
analyze:
name: Analyze
Expand All @@ -19,25 +16,20 @@ jobs:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]

language: ['ruby']
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Initialize CodeQL
uses: github/codeql-action/init@c99bbc0c74b76ffa9be1dea4e8bc8c73d945d43f # v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@c99bbc0c74b76ffa9be1dea4e8bc8c73d945d43f # v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c99bbc0c74b76ffa9be1dea4e8bc8c73d945d43f # v3
with:
category: "/language:${{matrix.language}}"
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ jobs:
outputs:
changed: ${{ steps.check.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Check if version has been updated
id: check
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44
with:
files: lib/rspec_profiling/version.rb
release:
runs-on: ubuntu-latest
needs: version-check
if: ${{ github.event_name == 'workflow_dispatch' || needs.version-check.outputs.changed == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 # v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Installing dependencies
run: bundle install
- name: Build gem file
run: bundle exec rake build
- uses: fac/ruby-gem-setup-credentials-action@v2
- uses: fac/ruby-gem-setup-credentials-action@5f62d5f2f56a11c7422a92f81fbb29af01e1c00f # v2
with:
user: ""
key: rubygems
token: ${{secrets.RUBY_GEMS_API_KEY}}
- uses: fac/ruby-gem-push-action@v2
- uses: fac/ruby-gem-push-action@81d77bf568ff6659d7fae0f0c5a036bb0aeacb1a # v2
with:
key: rubygems
50 changes: 23 additions & 27 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,33 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"

- cron: "30 1 * * *"
permissions:
contents: read

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Number of days of inactivity before an issue becomes stale
days-before-stale: 60
# Number of days of inactivity before a stale issue is closed
days-before-close: 7
# Issues with these labels will never be considered stale
exempt-issue-labels: "on-hold,pinned,security"
exempt-pr-labels: "on-hold,pinned,security"
# Comment to post when marking an issue as stale.
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Label to use when marking an issue as stale
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Number of days of inactivity before an issue becomes stale
days-before-stale: 60
# Number of days of inactivity before a stale issue is closed
days-before-close: 7
# Issues with these labels will never be considered stale
exempt-issue-labels: "on-hold,pinned,security"
exempt-pr-labels: "on-hold,pinned,security"
# Comment to post when marking an issue as stale.
stale-issue-message: >
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
# Label to use when marking an issue as stale
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
9 changes: 3 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ jobs:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: ${{ env.PGUSER }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 # v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
Expand Down
1 change: 1 addition & 0 deletions rspec_profiling.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "sqlite3", "~>1.4", "< 2.0.2"

spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata['rubygems_mfa_required'] = 'true'
Expand Down

0 comments on commit 3229c7b

Please sign in to comment.