Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add reusable workflows #3295

Merged
merged 3 commits into from
Jul 13, 2023
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
58 changes: 0 additions & 58 deletions .github/ISSUE_TEMPLATE/adoption_request.md

This file was deleted.

47 changes: 0 additions & 47 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

88 changes: 0 additions & 88 deletions .github/workflows/close-inactive-issues.yml

This file was deleted.

57 changes: 16 additions & 41 deletions .github/workflows/discord-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,19 @@ on:
types: [ created ]

jobs:
message:
runs-on: ubuntu-latest
steps:
- name: New Discussion
uses: tsickert/[email protected]
if: ${{ (github.event_name == 'discussion') }}
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_GITHUB }}
avatar-url: https://avatars.githubusercontent.com/u/9919?s=200&v=4
embed-author-name: ${{ github.event.sender.login }}
embed-author-url: ${{ github.event.sender.html_url }}
embed-author-icon-url: ${{ github.event.sender.avatar_url }}
embed-title: ${{ github.event.discussion.title }}
embed-url: ${{ github.event.discussion.html_url }}
embed-description: A **discussion** has been created in ${{ github.repository }}.

- name: New Issue
uses: tsickert/[email protected]
if: ${{ (github.event_name == 'issues') }}
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_GITHUB }}
avatar-url: https://avatars.githubusercontent.com/u/9919?s=200&v=4
embed-author-name: ${{ github.event.sender.login }}
embed-author-url: ${{ github.event.sender.html_url }}
embed-author-icon-url: ${{ github.event.sender.avatar_url }}
embed-title: ${{ github.event.issue.title }}
embed-url: ${{ github.event.issue.html_url }}
embed-description: An **issue** has been opened in ${{ github.repository }}.

- name: New Pull Request
uses: tsickert/[email protected]
if: ${{ (github.event_name == 'pull_request_target') }}
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_GITHUB }}
avatar-url: https://avatars.githubusercontent.com/u/9919?s=200&v=4
embed-author-name: ${{ github.event.sender.login }}
embed-author-url: ${{ github.event.sender.html_url }}
embed-author-icon-url: ${{ github.event.sender.avatar_url }}
embed-title: ${{ github.event.pull_request.title }}
embed-url: ${{ github.event.pull_request.html_url }}
embed-description: A **pull request** has been opened in ${{ github.repository }}.
trigger-workflow:
uses: eclipse-edc/.github/.github/workflows/discord-webhook.yml@main
with:
event_discussion_html_url: ${{ github.event.discussion.html_url }}
event_discussion_title: ${{ github.event.discussion.title }}
event_issue_html_url: ${{ github.event.issue.html_url }}
event_issue_title: ${{ github.event.issue.title }}
event_name: ${{ github.event_name }}
event_pull_request_html_url: ${{ github.event.pull_request.html_url }}
event_pull_request_title: ${{ github.event.pull_request.title }}
event_sender_avatar_url: ${{ github.event.sender.avatar_url }}
event_sender_html_url: ${{ github.event.sender.html_url }}
event_sender_login: ${{ github.event.sender.login }}
repository_name: ${{ github.repository }}
secrets:
env_discord: ${{ secrets.DISCORD_WEBHOOK_GITHUB }}
16 changes: 4 additions & 12 deletions .github/workflows/first-interaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ on:
types: [ opened ]

jobs:
add-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thanks for your contribution :fire: We will take a look asap :rocket:'
pr-message: >-
We are always happy to welcome new contributors :heart: To make things easier for everyone, please
make sure to follow our [contribution guidelines](https://github.com/eclipse-edc/Connector/blob/main/CONTRIBUTING.md),
check if you have already signed the [ECA](http://www.eclipse.org/legal/ecafaq.php), and
relate this pull request to an existing issue or discussion.
trigger-workflow:
uses: eclipse-edc/.github/.github/workflows/first-interaction.yml@main
secrets:
envGH: ${{ secrets.GITHUB_TOKEN }}
34 changes: 4 additions & 30 deletions .github/workflows/scan-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,7 @@ concurrency:
cancel-in-progress: true

jobs:
check-pull-request-title:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: deepakputhraya/action-pr-title@master
with:
# Match pull request titles conventional commit syntax (https://www.conventionalcommits.org/en/v1.0.0/)
# (online tool for regex quick check: https://regex101.com/r/V5J8kh/1)
#
# Valid examples would be
# - fix: resolve minor issue
# - docs(Sample5): update docs for configuration
# - feat(management-api)!: change path to access contract agreements
#
# Invalid examples would be
# - Add cool feature
# - Feature/some cool improvement
# - fix: resolve minor issue.
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+((,|\/|\\)?\s?\w+)+\))?!?: [\S ]{1,80}[^\.]$'
allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test'
prefix_case_sensitive: true

check-for-assigned-labels:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: agilepathway/[email protected]
with:
any_of: api,bug,build,dependencies,documentation,enhancement,no-changelog,refactoring
repo_token: ${{ secrets.GITHUB_TOKEN }}
trigger-workflow:
uses: eclipse-edc/.github/.github/workflows/scan-pull-request.yml@main
secrets:
envGH: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Close Inactive Issues

on:
schedule:
- cron: "30 1 * * *" # once a day (1:30 UTC)
workflow_dispatch: # allow manual trigger

jobs:
trigger-workflow:
uses: eclipse-edc/.github/.github/workflows/stale-bot.yml@main
secrets:
envGH: ${{ secrets.GITHUB_TOKEN }}
Loading