Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/after-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: after-merge-dependabot

on:
pull_request_target:
types: [closed]

permissions:
contents: read

jobs:
check:
if: github.event.pull_request.merged && github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
concurrency:
group: dependabot-after-merge
cancel-in-progress: true
steps:
- name: Fetch dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- uses: oprypin/find-latest-tag@v1
id: octokit
with:
repository: ${{ github.repository }}
prefix: v

- name: Parse last release
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: '${{ steps.octokit.outputs.tag }}'
version_extractor_regex: 'v(.*)$'

- name: Compute tag
id: compte_tag
run: |
major=${{ steps.semver_parser.outputs.major }}
minor=${{ steps.semver_parser.outputs.minor }}
patch=${{ steps.semver_parser.outputs.patch }}
if [ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-minor" ]; then
minor=$((minor+1))
patch=0
echo "::warning::bumping minor version"
elif [ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-patch" ]; then
patch=$((patch+1))
echo "::warning::bumping patch version"
fi
tag="v${major}.${minor}.${patch}"
echo "::set-output name=tag::${tag}"
echo "::warning::tag == ${tag}"

- name: Create tag
uses: tvdias/github-tagger@v0.0.2
if: steps.compte_tag.outputs.tag != steps.semver_parser.outputs.fullversion
with:
repo-token: "${{ secrets.AUTO_MERGE_TOKEN }}"
tag: "${{ steps.compte_tag.outputs.tag }}"
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
22 changes: 22 additions & 0 deletions .github/workflows/auto-accept-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: auto-accept-dependabot

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Approve and Enable Auto-Merge
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 20 additions & 12 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
name: linter
name: golangci-lint
on:
push:
branches:
- main
- master
pull_request:

on: push
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
linter:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
fetch-depth: 0

- name: set up go
uses: actions/setup-go@v5
with:
go-version: "1.25"

go-version: '>=1.26'
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: latest
args: >
--enable govet
--enable staticcheck
--enable unused
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v5
with:
go-version: 1.25
go-version: ">=1.26"

- name: cache go modules
uses: actions/cache@v4
Expand Down
Loading