Skip to content

Commit

Permalink
Merge pull request #4 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Improve README and tests
  • Loading branch information
andyone authored Jun 26, 2024
2 parents 2d22689 + 64cc500 commit 4e20965
Show file tree
Hide file tree
Showing 13 changed files with 178 additions and 60 deletions.
26 changes: 26 additions & 0 deletions .bibop/siocrypt.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Bibop recipe for siocrypt
# See more: https://kaos.sh/bibop

fast-finish yes

var password MyPassword1234

command "-" "Calculate data checksum"
checksum-read test.txt data_checksum

command "siocrypt -p {password} test.txt test.enc" "Encode data"
exit 0
exist test.enc
mode test.enc 600
!empty test.enc

command "siocrypt -D -p {password} test.enc test.dec" "Decode data"
exit 0
exist test.dec
mode test.dec 600
!empty test.dec
checksum test.dec {data_checksum}

command "siocrypt -D -p {password} test.enc" "Decode data to standard output"
exit 0
output-contains "TEST-DATA-1234"
1 change: 1 addition & 0 deletions .bibop/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TEST-DATA-1234
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 `siocrypt -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 `siocrypt -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
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ jobs:
- name: Run tests
run: make all

- name: Run test recipes with Bibop
uses: essentialkaos/bibop-action@v1
with:
path: .
recipe: .bibop/siocrypt.recipe

Hadolint:
name: Hadolint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -90,7 +96,7 @@ jobs:
steps:
- name: Check event type
run: |
if [[ "${{github.event_name}}" != "pull_request" ]] ; then
if [[ "$GITHUB_EVENT_NAME" != "pull_request" ]] ; then
echo "::notice::Event type is not 'pull_request', all job actions will be skipped"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
- name: Build and push Docker images (Docker)
if: ${{ steps.build_check.outputs.build == 'true' }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand All @@ -148,7 +148,7 @@ jobs:
- name: Build and push Docker images (GHCR)
if: ${{ steps.build_check.outputs.build == 'true' }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################

# This Makefile generated by GoMakeGen 3.0.2 using next command:
# This Makefile generated by GoMakeGen 3.0.5 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
Expand Down Expand Up @@ -109,6 +109,6 @@ help: ## Show this info
| sed 's/ifdef //' \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 3.0.2\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 3.0.5\033[0m\n'

################################################################################
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<p align="center">
<a href="https://kaos.sh/l/siocrypt"><img src="https://kaos.sh/l/21be11a0cf23f4dcea42.svg" alt="Code Climate Maintainability" /></a>
<a href="https://kaos.sh/b/siocrypt"><img src="https://kaos.sh/b/07a41351-9d6d-45b1-9a02-344ef3b50466.svg" alt="Codebeat badge" /></a>
<a href="https://kaos.sh/y/siocrypt"><img src="https://kaos.sh/y/31ef70b4136e4b48aab5d4b934e11eac.svg" alt="Codacy badge" /></a>
<br/>
<a href="https://kaos.sh/w/siocrypt/ci"><img src="https://kaos.sh/w/siocrypt/ci.svg" alt="GitHub Actions CI Status" /></a>
<a href="https://kaos.sh/w/siocrypt/codeql"><img src="https://kaos.sh/w/siocrypt/codeql.svg" alt="GitHub Actions CodeQL Status" /></a>
<a href="#license"><img src=".github/images/license.svg"/></a>
Expand Down Expand Up @@ -71,7 +73,7 @@ siocrypt --generate-man | sudo gzip > /usr/share/man/man1/siocrypt.1.gz

### Usage

<p align="center"><img src=".github/images/usage.svg"/></p>
<img src=".github/images/usage.svg"/>

### CI Status

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/essentialkaos/siocrypt
go 1.19

require (
github.com/essentialkaos/ek/v12 v12.127.0
github.com/essentialkaos/ek/v12 v12.128.0
github.com/essentialkaos/sio v1.0.0
golang.org/x/crypto v0.24.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU=
github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8=
github.com/essentialkaos/ek/v12 v12.127.0 h1:fU5A+QbIZ7NTq1K5jGVwAWwuLtBUhsIKuRWYT78hE+Q=
github.com/essentialkaos/ek/v12 v12.127.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw=
github.com/essentialkaos/ek/v12 v12.128.0 h1:vaBvqvYZtkBxmiYSMllYA6MRbNbiOXcxwKEVbZqxxLE=
github.com/essentialkaos/ek/v12 v12.128.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw=
github.com/essentialkaos/sio v1.0.0 h1:+VZg0Z7+Cx8F/FmlczzTJYM6rq/LhTR45Rsditmu0Ec=
github.com/essentialkaos/sio v1.0.0/go.mod h1:lKaW6IPMJ8GAEAiXe175zcEld370u3Nr546c22Kw5C8=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
Expand Down

0 comments on commit 4e20965

Please sign in to comment.