-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
8,484 additions
and
2,194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,98 @@ | ||
name: 👋 Auto Comment | ||
on: [issues, pull_request] | ||
name: 💬 Auto Comment | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
pull_request: | ||
types: [opened, closed] | ||
pull_request_target: | ||
types: [opened, closed] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
run: | ||
auto_comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: bubkoo/auto-comment@v1.1.2 | ||
- name: 🤖 Auto Comment on Issues and PRs | ||
uses: actions/github-script@v7 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
issuesOpened: > | ||
👋 Hi @{{ author }}, | ||
Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki | ||
For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE | ||
Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response. | ||
pullRequestOpened: > | ||
👋 Hi @{{ author }}, | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const { owner, repo } = context.repo; | ||
const author = context.payload.sender.login; | ||
if (context.eventName === 'issues' && context.payload.action === 'opened') { | ||
const issueTitle = context.payload.issue.title.toLowerCase(); | ||
let commentBody; | ||
if (issueTitle.includes('feat')) { | ||
commentBody = `Hey @${author}! 🚀 Thanks for this exciting feature idea! | ||
Thank you for sending this pull request. | ||
We love seeing fresh concepts that could take reNgine to the next level. 🌟 | ||
To help us understand your vision better, could you: | ||
📝 Provide a detailed description of the feature | ||
🎯 Explain the problem it solves or the value it adds | ||
💡 Share any implementation ideas you might have | ||
Your input is invaluable in shaping the future of reNgine. Let's innovate together! 💪`; | ||
} else { | ||
commentBody = `Hey @${author}! 👋 Thanks for flagging this bug! 🐛🔍 | ||
Please make sure you have followed our [contribution guidelines](https://github.com/yogeshojha/rengine/blob/master/.github/CONTRIBUTING.md). | ||
You're our superhero bug hunter! 🦸♂️🦸♀️ Before we suit up to squash this bug, could you please: | ||
📚 Double-check our documentation: https://rengine.wiki | ||
🕵️ Make sure it's not a known issue | ||
📝 Provide all the juicy details about this sneaky bug | ||
Once again - thanks for your vigilance! 🛠️🚀`; | ||
} | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner, | ||
repo, | ||
body: commentBody | ||
}); | ||
} else if ((context.eventName === 'pull_request' || context.eventName === 'pull_request_target') && context.payload.action === 'opened') { | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner, | ||
repo, | ||
body: `Woohoo @${author}! 🎉 You've just dropped some hot new code! 🔥 | ||
We will review this PR as soon as possible. Thank you for your patience. | ||
Hang tight while we review this! You rock! 🤘` | ||
}); | ||
} else if ((context.eventName === 'pull_request' || context.eventName === 'pull_request_target') && context.payload.action === 'closed') { | ||
const isPRMerged = context.payload.pull_request.merged; | ||
let commentBody; | ||
pullRequestClosed: > | ||
🚀 Hi @{{ author }}, | ||
if (isPRMerged) { | ||
commentBody = `Holy smokes! 🤯 You've just made reNgine even more awesome! | ||
You are amazing! Thank you for your contributions. Your contributions are what makes reNgine awesome! | ||
Your code is now part of the reNgine hall of fame. 🏆 | ||
Keep the cool ideas coming - maybe next time you'll break the internet! 💻💥 | ||
This pull request has now been closed. | ||
Virtual high fives all around! 🙌`; | ||
} else { | ||
commentBody = `Hey, thanks for your contribution! 🙏 | ||
We look forward to your more contributions and support. | ||
We appreciate the time and effort you put into this PR. Sadly this is not the right fit for reNgine at the moment. | ||
While we couldn't merge it this time, we value your interest in improving reNgine. | ||
Feel free to reach out if you have any questions. Thanks again!`; | ||
} | ||
Thanks | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner, | ||
repo, | ||
body: commentBody | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Update Version and Changelog and Readme | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-version-and-changelog: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get latest release info | ||
id: get_release | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const release = await github.rest.repos.getLatestRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
core.setOutput('tag_name', release.data.tag_name); | ||
core.setOutput('body', release.data.body); | ||
- name: Update version file | ||
run: echo ${{ steps.get_release.outputs.tag_name }} > web/.version | ||
|
||
- name: Update CHANGELOG.md | ||
run: | | ||
echo "# Changelog" > CHANGELOG.md.new | ||
echo "" >> CHANGELOG.md.new | ||
echo "## ${{ steps.get_release.outputs.tag_name }}" >> CHANGELOG.md.new | ||
echo "" >> CHANGELOG.md.new | ||
echo "${{ steps.get_release.outputs.body }}" >> CHANGELOG.md.new | ||
echo "" >> CHANGELOG.md.new | ||
if [ -f CHANGELOG.md ]; then | ||
sed '1,2d' CHANGELOG.md >> CHANGELOG.md.new | ||
fi | ||
mv CHANGELOG.md.new CHANGELOG.md | ||
- name: Update README.md | ||
run: | | ||
sed -i 's|https://img.shields.io/badge/version-.*-informational|https://img.shields.io/badge/version-${{ steps.get_release.outputs.tag_name }}-informational|g' README.md | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add web/.version CHANGELOG.md README.md | ||
if git diff --staged --quiet; then | ||
echo "No changes to commit" | ||
else | ||
git commit -m "reNgine release: ${{ steps.get_release.outputs.tag_name }} :rocket:" | ||
git push origin HEAD:${{ github.event.repository.default_branch }} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,58 @@ | ||
name: Build Docker image | ||
name: 🚀 Build and Push Docker image | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
release: | ||
types: [published] | ||
schedule: | ||
- cron: '0 18 * * 5' | ||
- cron: '0 0 */5 * *' # Run every 5 days at midnight UTC | ||
|
||
jobs: | ||
build: | ||
name: Build Docker image | ||
build-and-push: | ||
name: 🐳 Build and Push Docker image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
steps: | ||
- name: Checkout the git repo | ||
- name: 📥 Checkout the git repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
- name: 🖥️ Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: 🛠️ Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: 🔑 Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
- name: 🏷️ Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: yogeshojha/rengine | ||
tags: | | ||
type=raw,value=${{ matrix.platform }}-latest,enable={{is_default_branch}} | ||
type=semver,pattern=${{ matrix.platform }}-{{version}} | ||
type=semver,pattern=${{ matrix.platform }}-{{major}}.{{minor}} | ||
type=semver,pattern=${{ matrix.platform }}-{{major}} | ||
type=sha,prefix=${{ matrix.platform }}-sha- | ||
type=schedule,pattern=${{ matrix.platform }}-{{date 'YYYYMMDD'}} | ||
- name: Build Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
- name: 🏗️ Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: web/ | ||
push: true | ||
platforms: ${{ matrix.platform }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
Oops, something went wrong.