Updates github workflows and automates changelog

This commit is contained in:
bobokun 2023-03-05 11:04:51 -05:00
parent cb2f605dbb
commit 1cb4d21ed2
No known key found for this signature in database
GPG key ID: B73932169607D927
3 changed files with 52 additions and 1 deletions

View file

@ -0,0 +1,36 @@
name: Dependabot Pull Request Approve and Merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
# Checking the actor will prevent your Action run failing on non-Dependabot
# PRs but also ensures that it only does work for Dependabot PRs.
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
# This first step will fail if there's no metadata and so the approval
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Here the PR gets approved.
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Finally, this sets the PR to allow auto-merging for patch and minor
# updates if all checks pass
- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -32,7 +32,7 @@ jobs:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Build and push
id: docker_build
@ -43,3 +43,11 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qbit_manage:${{ steps.get_version.outputs.VERSION }}
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG
token: ${{ secrets.PAT }}
tag_name: ${{ steps.get_version.outputs.VERSION }}

7
CHANGELOG Normal file
View file

@ -0,0 +1,7 @@
# Requirements Updated
- Bump qbittorrent-api from 2022.11.42 to 2023.2.43
# Bug Fixes
- Fixes NoHL torrents being removed when criteria not met (#205)
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.4.3...v3.4.4