Skip to content

Commit

Permalink
Added github workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangrynenko committed Sep 6, 2024
1 parent 4325697 commit 0905be9
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.docker/ export-ignore
/.idea/ export-ignore
/.github/ export-ignore
/.ahoy.yml export-ignore
/.dockerignore export-ignore
/.env export-ignore
Expand Down
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Checklist before requesting a review

- [ ] I have formatted the subject to include ticket number as `[#123] Verb in past tense with dot at the end.`
- [ ] I have added a link to the issue tracker
- [ ] I have provided information in `Changed` section about WHY something was done if this was not a normal implementation
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have run new and existing relevant tests locally with my changes, and they passed
- [ ] I have provided screenshots, where applicable

## Changed

1.

## Screenshots
14 changes: 14 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
default: minor
template: |
## What's new since $PREVIOUS_TAG
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
$CONTRIBUTORS
18 changes: 18 additions & 0 deletions .github/workflows/assign-author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Auto Author Assign'

on:
pull_request_target:
types:
- opened
- reopened

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest

steps:
- name: Assign author
uses: toshimaru/[email protected]
27 changes: 27 additions & 0 deletions .github/workflows/dispatch-webhook-lagoon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
##
# GitHub Actions workflow to dispatch a PR webhook for a Pull Request.
#
# This is used to allow more granular control over the operations that trigger
# webhooks.
#
# Note that Lagoon's webhook should be disabled in GitHub.

name: Dispatch a webhook to Lagoon when Pull Request is closed

on:
pull_request:
types: [closed]

jobs:
dispatch_webhook_lagoon_remove_environment_pr_closed:
runs-on: ubuntu-latest
steps:
- name: Remove environment after a PR is closed
run: |
cat $GITHUB_EVENT_PATH | curl \
-X POST \
--header "Content-Type: application/json" \
--header "X-GitHub-Delivery: ${RUNNER_TRACKING_ID:7}" \
--header "X-GitHub-Event: pull_request" \
--data-binary @- \
"${LAGOON_WEBHOOK_ENDPOINT-https://hooks.lagoon.amazeeio.cloud/}"
25 changes: 25 additions & 0 deletions .github/workflows/draft-release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Draft release notes

on:
push:
tags:
- '*'
branches:
- develop

permissions:
contents: write

jobs:
release-drafter:
permissions:
contents: write
pull-requests: write

runs-on: ubuntu-latest

steps:
- name: Draft release notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/label-merge-conflict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Auto-label a PR with a conflict"

on:
push:
pull_request_target:
types:
- synchronize

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if PRs have conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "CONFLICT"
removeOnDirtyLabel: "Needs review"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
push:
tags:
- '*'
branches:
- production

permissions:
contents: write

jobs:
release-drafter:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Renovate
on:
schedule:
- cron: '1 9 * * 1'
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- uses: suzuki-shunsuke/[email protected]
- name: Self-hosted Renovate
uses: renovatebot/[email protected]
env:
# Update the value of RENOVATE_GIT_AUTHOR with your own.
RENOVATE_GIT_AUTHOR: 'Renovate Self Hosted <[email protected]>'
RENOVATE_DEPENDENCY_DASHBOARD_TITLE: 'Renovate Dependency Dashboard (self-hosted) by GitHub Actions'
RENOVATE_DEPENDENCY_DASHBOARD: true
RENOVATE_REPOSITORIES: ${{ github.repository }}
RENOVATE_PLATFORM: 'github'
RENOVATE_AUTODISCOVER: false
RENOVATE_DRY_RUN: true
with:
configurationFile: renovate-gh.json
token: ${{ secrets.RENOVATE_TOKEN }}

0 comments on commit 0905be9

Please sign in to comment.