From 1388aad7e71cecbf4887bf9bae2ee7a118c430ef Mon Sep 17 00:00:00 2001 From: Arthri <41360489+Arthri@users.noreply.github.com> Date: Thu, 29 Jun 2023 16:42:28 +0800 Subject: [PATCH] Initial commit --- .gitattributes | 1 + .github/ISSUE_TEMPLATE/bug_report.yml | 32 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 27 ++++++++++++++++ .github/ISSUE_TEMPLATE/other.yml | 17 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 7 ++++ .../major_release_request.md | 21 ++++++++++++ .../PULL_REQUEST_TEMPLATE/merge_request.md | 9 ++++++ .../minor_release_request.md | 16 ++++++++++ .../patch_release_request.md | 10 ++++++ .../prerelease_request.md | 21 ++++++++++++ .github/workflows/release_request.yml | 20 ++++++++++++ .github/workflows/reusable_workflow.yml | 17 ++++++++++ .github/workflows/run_reusable_workflow.yml | 9 ++++++ .github/workflows/update_major_tag.yml | 16 ++++++++++ CONTRIBUTING.md | 2 ++ LICENSE | 18 +++++++++++ README.md | 22 +++++++++++++ docs/Test_List.md | 11 +++++++ 18 files changed, 276 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/other.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/major_release_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/merge_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/minor_release_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/patch_release_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/prerelease_request.md create mode 100644 .github/workflows/release_request.yml create mode 100644 .github/workflows/reusable_workflow.yml create mode 100644 .github/workflows/run_reusable_workflow.yml create mode 100644 .github/workflows/update_major_tag.yml create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 docs/Test_List.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..7438b66 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,32 @@ +name: Bug Report +description: Create a report to help us improve +title: '[Bug]: ' +labels: [ "bug", "triage" ] +assignees: [] +body: + - type: textarea + attributes: + label: Description + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + attributes: + label: Reproduction + placeholder: |- + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: textarea + attributes: + label: Expected Behavior + placeholder: A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + attributes: + label: Additional Context + description: Add any other context about the problem here(such as a repository). diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..a1dc347 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,27 @@ +name: Feature request +description: Suggest an idea for this project +title: '[Feature]: ' +labels: [ "enhancement", "triage" ] +assignees: [] +body: + - type: textarea + attributes: + label: Description + description: A clear and concise description of what the problem is. + placeholder: I'm always frustrated when [...] + validations: + required: true + - type: textarea + attributes: + label: Solution + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Alternatives + description: A clear and concise description of any alternative solutions or features you've considered. + - type: textarea + attributes: + label: Additional Context + description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml new file mode 100644 index 0000000..e5be3c8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other.yml @@ -0,0 +1,17 @@ +name: Other +description: Submit an uncategorized issue +title: '[Other]: ' +labels: [ "other" ] +assignees: [] +body: + - type: textarea + attributes: + label: Description + description: A clear and concise description of what the problem is. + placeholder: I'm always frustrated when [...] + validations: + required: true + - type: textarea + attributes: + label: Additional Context + description: Add any other context about the problem here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a7e58b4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Click on the `Preview` tab and select a template: + +- [Merge Request](?expand=1&labels=triage&quick_pull=1&template=merge_request.md) +- [Patch Release Request](?expand=1&labels=release,release%3Apatch&quick_pull=1&template=patch_release_request.md&title=Release%20vMajor.Minor.Patch%5B%20%7C%20Release%20Name%5D) +- [Minor Release Request](?expand=1&labels=release,release%3Aminor&quick_pull=1&template=minor_release_request.md&title=Release%20vMajor.Minor.0%5B%20%7C%20Release%20Name%5D) +- [Major Release Request](?expand=1&labels=release,release%3Amajor&quick_pull=1&template=major_release_request.md&title=Release%20vMajor.0.0%5B%20%7C%20Release%20Name%5D) +- [Prerelease Request](?expand=1&labels=release,release%3Aprerelease&quick_pull=1&template=prerelease_request.md&title=Prerelease%20vMajor.Minor.Patch%5B-suffix%5D%5B%20%7C%20Release%20Name%5D) diff --git a/.github/PULL_REQUEST_TEMPLATE/major_release_request.md b/.github/PULL_REQUEST_TEMPLATE/major_release_request.md new file mode 100644 index 0000000..8ba4b4c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/major_release_request.md @@ -0,0 +1,21 @@ + + +## 🆕 Features + + +## 🐞 Fixes + + +## ❗ Breaking Changes + diff --git a/.github/PULL_REQUEST_TEMPLATE/merge_request.md b/.github/PULL_REQUEST_TEMPLATE/merge_request.md new file mode 100644 index 0000000..babeb9a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/merge_request.md @@ -0,0 +1,9 @@ +## Description + + +## Intent + + +## Additional Context + +None. diff --git a/.github/PULL_REQUEST_TEMPLATE/minor_release_request.md b/.github/PULL_REQUEST_TEMPLATE/minor_release_request.md new file mode 100644 index 0000000..03665e3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/minor_release_request.md @@ -0,0 +1,16 @@ + + +## 🆕 Features + + +## 🐞 Fixes + diff --git a/.github/PULL_REQUEST_TEMPLATE/patch_release_request.md b/.github/PULL_REQUEST_TEMPLATE/patch_release_request.md new file mode 100644 index 0000000..4c61c6a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/patch_release_request.md @@ -0,0 +1,10 @@ + + +## 🐞 Fixes + diff --git a/.github/PULL_REQUEST_TEMPLATE/prerelease_request.md b/.github/PULL_REQUEST_TEMPLATE/prerelease_request.md new file mode 100644 index 0000000..dd8bbba --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/prerelease_request.md @@ -0,0 +1,21 @@ + + +## 🆕 Features + + +## 🐞 Fixes + + +## ❗ Breaking Changes + diff --git a/.github/workflows/release_request.yml b/.github/workflows/release_request.yml new file mode 100644 index 0000000..9b9dc83 --- /dev/null +++ b/.github/workflows/release_request.yml @@ -0,0 +1,20 @@ +name: Release Request +run-name: Release Request + +on: + pull_request: + types: + - closed + - edited + - labeled + - opened + - unlabeled + branches: + - master + +jobs: + handle-release-request: + name: ${{ github.event.action == 'closed' && 'Resolve ' || 'Verify ' }}Release Request + permissions: + contents: write + uses: Arthri/release-request/.github/workflows/release-request.yml@v1 diff --git a/.github/workflows/reusable_workflow.yml b/.github/workflows/reusable_workflow.yml new file mode 100644 index 0000000..2d86dd8 --- /dev/null +++ b/.github/workflows/reusable_workflow.yml @@ -0,0 +1,17 @@ +name: New Reusable Workflow +run-name: New Reusable Workflow + +on: + workflow_call: + +defaults: + run: + shell: bash + +jobs: + reusable-workflow: + runs-on: ubuntu-22.04 + timeout-minutes: 1 + + steps: + - run: echo Hello, World! diff --git a/.github/workflows/run_reusable_workflow.yml b/.github/workflows/run_reusable_workflow.yml new file mode 100644 index 0000000..a60a421 --- /dev/null +++ b/.github/workflows/run_reusable_workflow.yml @@ -0,0 +1,9 @@ +name: New Reusable Workflow +run-name: New Reusable Workflow + +on: + repository_dispatch: + +jobs: + reusable-workflow: + uses: ./.github/workflows/reusable-workflow.yml diff --git a/.github/workflows/update_major_tag.yml b/.github/workflows/update_major_tag.yml new file mode 100644 index 0000000..54fc98b --- /dev/null +++ b/.github/workflows/update_major_tag.yml @@ -0,0 +1,16 @@ +name: Update v Tag +run-name: | + Update major tag: ${{ github.event_name }}${{ github.event_name == 'push' && (github.event.created && ' created' || ' deleted') || '' }} ${{ github.event.ref }} + +on: + delete: + + push: + tags: + - '**' + +jobs: + update-tag: + permissions: + contents: write + uses: Arthri/update-major-tag/.github/workflows/update-major-tag.yml@v1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..732b43e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,2 @@ +# Contributing +See https://arthri.github.io/Belp/Contributing diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b749846 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT No Attribution + +Copyright 2023 Arthri + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b73db43 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# reusable-workflow +A reusable workflow for doing x, y, and z. + +## Installation +Add a new workflow under `.github/workflows/` with the following contents. +```yml +name: New Reusable Workflow +run-name: New Reusable Workflow + +on: + push: + +jobs: + reusable-workflow: + uses: Arthri/reusable-workflow/.github/workflows/reusable-workflow.yml@v1 + +``` + +## Usage +1. Do this. +1. Do that. +1. This happens. diff --git a/docs/Test_List.md b/docs/Test_List.md new file mode 100644 index 0000000..d25c78c --- /dev/null +++ b/docs/Test_List.md @@ -0,0 +1,11 @@ +# Test List +A list of steps for testing the workflow's features. + +## Action fails randomly + +### Steps +1. Push to GitHub. + +### Outputs +1. Workflow triggers. +1. Workflow fails randomly.