Merge branch 'master' into release/2.2.0

This commit is contained in:
Yogesh Ojha
2024-08-16 12:10:33 +05:30
14 changed files with 765 additions and 552 deletions
+47 -24
View File
@@ -1,37 +1,60 @@
name: 👋 Auto Comment
on: [issues, pull_request]
name: 💬 Auto Comment
on:
issues:
types: [opened]
pull_request:
types: [opened, closed]
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 }},
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') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner,
repo,
body: `👋 Hi @${author},
Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki
Issues are only for reporting bugs or feature requests. Please read the 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.`
});
} else if (context.eventName === 'pull_request' && context.payload.action === 'opened') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner,
repo,
body: `👋 Hi @${author},
Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
Thank you for sending this pull request.
pullRequestOpened: >
👋 Hi @{{ author }},
Please make sure you have followed our [contribution guidelines](https://github.com/yogeshojha/rengine/blob/master/.github/CONTRIBUTING.md).
Thank you for sending this pull request.
We will review this PR as soon as possible. Thank you for your patience.`
});
} else if (context.eventName === 'pull_request' && context.payload.action === 'closed') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner,
repo,
body: `🚀 Hi @${author},
Please make sure you have followed our [contribution guidelines](https://github.com/yogeshojha/rengine/blob/master/.github/CONTRIBUTING.md).
You are amazing! Thank you for your contributions. Your contributions are what makes reNgine awesome!
We will review this PR as soon as possible. Thank you for your patience.
This pull request has now been closed.
pullRequestClosed: >
🚀 Hi @{{ author }},
We look forward to your future contributions and support.
You are amazing! Thank you for your contributions. Your contributions are what makes reNgine awesome!
This pull request has now been closed.
We look forward to your more contributions and support.
Thanks
Thanks`
});
}
+21 -12
View File
@@ -1,4 +1,4 @@
name: 🌄 Build Docker image for pull request
name: 🏗️ Build Docker image for pull request
on:
pull_request:
@@ -8,33 +8,42 @@ on:
jobs:
build:
name: Build Docker image
name: 🐳 Build Docker image
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
# - linux/arm/v7
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
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: 🖥️ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Extract metadata (tags, labels) for Docker
- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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=pr-${{ github.event.pull_request.number }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=pr
- name: Build Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
- name: 🏗️ Build Docker image
uses: docker/build-push-action@v5
with:
context: web/
platforms: ${{ matrix.platform }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
+31 -17
View File
@@ -1,40 +1,54 @@
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=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=sha-
type=schedule,pattern={{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: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
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