-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit ec683c0
Showing
28 changed files
with
894 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.yaml.j2] | ||
indent_size = 2 |
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,14 @@ | ||
--- | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
include: "scope" | ||
prefix: "github-actions" | ||
labels: | ||
- "deps" | ||
open-pull-requests-limit: 10 |
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,108 @@ | ||
--- | ||
|
||
name: CI | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
release: | ||
types: | ||
- 'created' | ||
schedule: | ||
# Every Tuesday at 03:10 | ||
- cron: '10 3 * * 2' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rabbitmq_version: ['alpine', 'management-alpine'] | ||
steps: | ||
- uses: e1himself/goss-installation-action@v1.0.4 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set Environment Variables | ||
env: | ||
IMAGE_NAMESPACE: wayofdev/rabbitmq | ||
TEMPLATE: ${{ matrix.rabbitmq_version }} | ||
run: | | ||
export RELEASE_VERSION=${GITHUB_REF#refs/*/} | ||
echo "IMAGE_NAMESPACE=${IMAGE_NAMESPACE}" >> $GITHUB_ENV | ||
echo "TEMPLATE=${TEMPLATE}" >> $GITHUB_ENV | ||
echo "VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.IMAGE_NAMESPACE }} | ||
tags: | | ||
type=raw,event=branch,value=latest | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
flavor: | | ||
latest=false | ||
prefix=${{ matrix.rabbitmq_version }}- | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
### For Cross Platform OSX builds uncomment these lines | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
install: true | ||
|
||
- name: Build and Export to Docker | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./dist/${{ env.TEMPLATE }} | ||
load: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
cache-from: type=registry,ref=${{ env.IMAGE_TAG }} | ||
cache-to: type=inline | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Test Docker Release Image | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }} make test | ||
- name: Test Docker Master Image | ||
if: success() && ! startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest make test | ||
- name: Push Docker Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./dist/${{ env.TEMPLATE }} | ||
### For Cross Platform OSX builds uncomment these lines | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
cache-from: type=registry,ref=${{ env.IMAGE_TAG }} | ||
cache-to: type=inline | ||
|
||
... |
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,39 @@ | ||
--- | ||
|
||
# https://github.com/google-github-actions/release-please-action#release-types-supported | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | ||
release-type: node | ||
package-name: docker-rabbitmq | ||
default-branch: master | ||
changelog-types: | | ||
[ | ||
{ "type": "feat", "section": "Features", "hidden": false }, | ||
{ "type": "fix", "section": "Bug Fixes", "hidden": false }, | ||
{ "type": "perf", "section": "Performance Improvements", "hidden": false }, | ||
{ "type": "docs", "section": "Documentation", "hidden": false }, | ||
{ "type": "chore", "section": "Miscellaneous", "hidden": false }, | ||
{ "type": "style", "section": "Styles", "hidden": true }, | ||
{ "type": "revert", "section": "Reverts", "hidden": true }, | ||
{ "type": "deps", "section": "Dependencies", "hidden": true }, | ||
{ "type": "refactor", "section": "Code Refactoring", "hidden": true }, | ||
{ "type": "test", "section": "Tests", "hidden": true }, | ||
{ "type": "build", "section": "Build System", "hidden": true }, | ||
{ "type": "ci", "section": "Continuous Integration", "hidden": true } | ||
] | ||
... |
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,27 @@ | ||
--- | ||
|
||
name: Differential ShellCheck | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Repository checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Differential ShellCheck | ||
uses: redhat-plumbers-in-action/differential-shellcheck@latest | ||
with: | ||
severity: warning | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
... |
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 @@ | ||
.idea |
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,18 @@ | ||
--- | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
|
||
- repo: https://github.com/commitizen-tools/commitizen | ||
rev: v2.37.0 | ||
hooks: | ||
- id: commitizen | ||
stages: | ||
- commit-msg | ||
|
||
... |
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,61 @@ | ||
--- | ||
|
||
extends: "default" | ||
|
||
ignore: | | ||
.build/ | ||
vendor/ | ||
# Overwrite above default rules | ||
rules: | ||
braces: | ||
# Defaults | ||
# min-spaces-inside: 0 | ||
# max-spaces-inside: 0 | ||
|
||
# Keep 0 min-spaces to not error on empty {} collection definitions | ||
min-spaces-inside: 0 | ||
|
||
# Allow one space inside braces to improve code readability | ||
max-spaces-inside: 1 | ||
|
||
brackets: | ||
# Defaults | ||
# min-spaces-inside: 0 | ||
# max-spaces-inside: 0 | ||
|
||
# Keep 0 min-spaces to not error on empty [] collection definitions | ||
min-spaces-inside: 0 | ||
|
||
# Allow one space inside braces to improve code readability | ||
max-spaces-inside: 1 | ||
|
||
colons: | ||
# Defaults | ||
# min-spaces-before: 0 | ||
# max-spaces-after: 1 | ||
|
||
# Allow multiple spaces after a colon to allow indentation of YAML | ||
# dictionary values | ||
max-spaces-after: -1 | ||
|
||
commas: | ||
# Defaults | ||
# max-spaces-after: 1 | ||
|
||
# Allow multiple spaces after a comma to allow indentation of YAML | ||
# dictionary values | ||
max-spaces-after: -1 | ||
|
||
comments: | ||
require-starting-space: true | ||
min-spaces-from-content: 1 | ||
|
||
line-length: | ||
max: 180 | ||
level: warning | ||
|
||
yaml-files: | ||
- "*.yaml" | ||
- "*.yml" | ||
|
||
... |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 @lotyp <lotyp7.woop@gmail.com> | ||
|
||
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, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
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. |
Oops, something went wrong.