Skip to content

Commit

Permalink
Merge pull request #205 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 3.5.0
  • Loading branch information
andyone authored Aug 4, 2024
2 parents 44af34a + 12f87b5 commit caf2d98
Show file tree
Hide file tree
Showing 18 changed files with 392 additions and 248 deletions.
11 changes: 0 additions & 11 deletions .codebeatsettings

This file was deleted.

51 changes: 0 additions & 51 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: ❗ Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["issue • bug"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar bug reports. If so, please add a 👍 reaction to the existing issue.
- type: textarea
attributes:
label: Verbose application info
description: Output of `rbinstall -vv` command
render: shell
validations:
required: true

- type: dropdown
id: version
attributes:
label: Install tools
description: How did you install this application
options:
- From Sources
- RPM Package
- Prebuilt Binary
default: 0
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Short guide on how to reproduce this problem on our site
placeholder: |
1. [First Step]
2. [Second Step]
3. [and so on...]
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen
validations:
required: true

- type: textarea
attributes:
label: Actual behavior
description: What actually happened
validations:
required: true

- type: textarea
attributes:
label: Additional info
description: Include gist of relevant config, logs, etc.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ❓ Question
description: Question about application, configuration or code
title: "[Question]: "
labels: ["issue • question"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar question. If so, please add a 👍 reaction to the existing issue.
- type: textarea
attributes:
label: Question
description: Detailed question
validations:
required: true

- type: textarea
attributes:
label: Related version application info
description: Output of `rbinstall -vv` command
render: shell
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ➕ Suggestion
description: Suggest new feature or improvement
title: "[Suggestion]: "
labels: ["issue • suggestion"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar feature requests. If so, please add a 👍 reaction to the existing issue.
>
> Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them.
- type: textarea
attributes:
label: Proposal
description: Description of the feature
validations:
required: true

- type: textarea
attributes:
label: Current behavior
description: What currently happens
validations:
required: true

- type: textarea
attributes:
label: Desired behavior
description: What you would like to happen
validations:
required: true

- type: textarea
attributes:
label: Use case
description: Why is this important (helps with prioritizing requests)
validations:
required: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Docker Push"
name: "CD (Release)"

on:
release:
Expand All @@ -19,15 +19,16 @@ permissions:

env:
IMAGE_NAME: ${{ github.repository }}
LATEST_IMAGE: ol8

jobs:
Docker:
name: Docker Build & Publish
BuildImage:
name: Image Build & Publish
runs-on: ubuntu-latest

strategy:
matrix:
image: [ 'ol8', 'ol9' ]
image: [ 'ol8', 'ol9', 'ruby', 'ruby-jemalloc', 'jruby' ]

steps:
- name: Checkout
Expand All @@ -48,9 +49,32 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare metadata for build
- name: Checkout the latest tag
run: |
rev=$(git rev-list --tags --max-count=1)
tag=$(git describe --tags "$rev")
if [[ -z "$tag" ]] ; then
echo "::error::Can't find the latest tag"
exit 1
fi
echo -e "\033[34mRev:\033[0m $rev"
echo -e "\033[34mTag:\033[0m $tag"
git checkout "$tag"
- name: Prepare metadata for the build
id: metadata
run: |
rev=$(git rev-list --tags --max-count=1)
version=$(git describe --tags "$rev" | tr -d 'v')
if [[ -z "$version" ]] ; then
echo "::error::Can't find version info"
exit 1
fi
docker_file=".docker/${{matrix.image}}.docker"
base_image=$(grep 'FROM ' $docker_file | grep -v 'builder' | sed 's#${REGISTRY}/##' | tail -1 | cut -f2 -d' ')
Expand All @@ -59,14 +83,21 @@ jobs:
exit 1
fi
dh_tags="${{env.IMAGE_NAME}}:${{matrix.image}}"
gh_tags="ghcr.io/${{env.IMAGE_NAME}}:${{matrix.image}}"
dh_tags="${{env.IMAGE_NAME}}:${{matrix.image}}-$version,${{env.IMAGE_NAME}}:${{matrix.image}}"
gh_tags="ghcr.io/${{env.IMAGE_NAME}}:${{matrix.image}}-$version,ghcr.io/${{env.IMAGE_NAME}}:${{matrix.image}}"
if [[ -n "${{env.LATEST_IMAGE}}" && "${{env.LATEST_IMAGE}}" == "${{matrix.image}}" ]] ; then
dh_tags="$dh_tags,${{env.IMAGE_NAME}}:latest"
gh_tags="$gh_tags,ghcr.io/${{env.IMAGE_NAME}}:latest"
fi
echo "version=$version" >> $GITHUB_OUTPUT
echo "dockerfile=$docker_file" >> $GITHUB_OUTPUT
echo "baseimage=$base_image" >> $GITHUB_OUTPUT
echo "dh_tags=$dh_tags" >> $GITHUB_OUTPUT
echo "gh_tags=$gh_tags" >> $GITHUB_OUTPUT
echo -e "\033[34mVersion:\033[0m $version"
echo -e "\033[34mDockerfile:\033[0m $docker_file"
echo -e "\033[34mBase image:\033[0m $base_image"
echo -e "\033[34mDH Tags:\033[0m $dh_tags"
Expand All @@ -75,13 +106,13 @@ jobs:
- name: Check if build/rebuild is required
id: build_check
run: |
if [[ "${{github.event_name}}" == "release" ]] ; then
if [[ "$GITHUB_EVENT_NAME" == "release" ]] ; then
echo "build=true" >> $GITHUB_OUTPUT
exit 0
fi
if [[ "${{ github.event.inputs.force_rebuild }}" == "true" ]] ; then
echo "::warning::Rebuild ${{matrix.image}} (reason: forced rebuild)"
echo "::warning::Rebuild ${{matrix.version}} (reason: forced rebuild)"
echo "build=true" >> $GITHUB_OUTPUT
exit 0
fi
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI (PR)

on:
pull_request:
branches: [master]
workflow_dispatch:
inputs:
force_run:
description: 'Force workflow run'
required: true
type: choice
options: [yes, no]

permissions:
actions: read
contents: read
statuses: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
CI:
uses: ./.github/workflows/ci.yml
secrets: inherit

ImageBuild:
name: Container Image Build Check
runs-on: ubuntu-latest

needs: CI

env:
REGISTRY: ghcr.io

strategy:
matrix:
image: [ 'ol8', 'ol9', 'ruby', 'ruby-jemalloc', 'jruby' ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
if: ${{ env.DOCKERHUB_USERNAME != '' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build --build-arg REGISTRY=${REGISTRY} -f .docker/${{matrix.image}}.docker -t ${{matrix.image}} .
- name: Show info about built Docker image
uses: essentialkaos/docker-info-action@v1
with:
image: ${{matrix.image}}
show-labels: true
26 changes: 26 additions & 0 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI (Push)

on:
push:
branches: [master, develop]
workflow_dispatch:
inputs:
force_run:
description: 'Force workflow run'
required: true
type: choice
options: [yes, no]

permissions:
actions: read
contents: read
statuses: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
CI:
uses: ./.github/workflows/ci.yml
secrets: inherit
Loading

0 comments on commit caf2d98

Please sign in to comment.