Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Bump Yelp/detect-secrets from 1.4.0 to 1.5.0 (#8)
Browse files Browse the repository at this point in the history
* Bump Yelp/detect-secrets from 1.4.0 to 1.5.0

* Add bashate

* Add .tool-versions file

* Add deprecation warning message
  • Loading branch information
fabasoad authored Aug 3, 2024
1 parent 0ea4bff commit 69ca460
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 79 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,6 @@ on: # yamllint disable-line rule:truthy
- "v*.*.*"

jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changelog
id: changelog
uses: simbo/changes-since-last-release-action@v1
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
name: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
# Changelog
${{ steps.changelog.outputs.log }}
draft: false
prerelease: false
- name: Bump tags
uses: fischerscode/tagger@v0
with:
prefix: v
github:
name: GitHub
uses: fabasoad/reusable-workflows/.github/workflows/wf-github-release.yml@main
27 changes: 4 additions & 23 deletions .github/workflows/update-license.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
---
name: Update license
name: License

on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 5 1 1 *"

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update LICENSE file
uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
assignees: ${{ github.repository_owner }}
labels: enhancement
prTitle: Update license copyright year to {{currentYear}}
prBody: |
## Changelog
- Update license copyright year to {{currentYear}}
---
Powered by [FantasticFiasco/action-update-license-year](https://github.com/FantasticFiasco/action-update-license-year)
maintenance:
name: Maintenance
uses: fabasoad/reusable-workflows/.github/workflows/wf-update-license.yml@main
31 changes: 22 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,37 @@ minimum_pre_commit_version: 2.18.0
repos:
# Security
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
rev: v8.18.4
hooks:
- id: gitleaks
- repo: https://github.com/fabasoad/pre-commit-grype
rev: v0.6.0
hooks:
- id: grype-dir
args:
- --grype-args=--by-cve --fail-on=low
- --hook-args=--log-level debug
stages: ["push"]
# Dockerfile
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
rev: v2.13.0-beta
hooks:
- id: hadolint
stages: ["push"]
# Shell
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
- repo: https://github.com/openstack/bashate
rev: 2.1.1
hooks:
- id: shellcheck
stages: ["push"]
- id: bashate
args: ["-i", "E003,E006"]
stages: ["commit"]
# Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
rev: v0.41.0
hooks:
- id: markdownlint-fix
stages: ["commit"]
Expand All @@ -38,7 +47,7 @@ repos:
stages: ["push"]
# GitHub Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
rev: v1.7.1
hooks:
- id: actionlint
args: ["-pyflakes="]
Expand All @@ -52,6 +61,10 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
stages: ["commit"]
- id: check-shebang-scripts-are-executable
stages: ["commit"]
- id: check-merge-conflict
- id: check-json
stages: ["push"]
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hadolint 2.12.0
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Setup Cassandra action
# Setup Cassandra Action (Deprecated)

> :warning: **This GitHub action is deprecated and no longer maintained.**
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/setup-cassandra-action?include_prereleases)
![linting](https://github.com/fabasoad/setup-cassandra-action/actions/workflows/linting.yml/badge.svg)

This GitHub action helps you to setup Cassandra schema.
This GitHub Action helps you to set up Cassandra schema.

## Inputs

Expand All @@ -22,8 +24,6 @@ This GitHub action helps you to setup Cassandra schema.

## Example usage

### Workflow configuration

```yaml
name: Setup Cassandra

Expand All @@ -34,8 +34,8 @@ jobs:
name: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: fabasoad/setup-cassandra-action@main
- uses: actions/checkout@v4
- uses: fabasoad/setup-cassandra-action@v1
with:
host: "192.13.131.0"
port: 9042
Expand All @@ -45,7 +45,3 @@ jobs:
keyspace: test
scripts_path: "./scripts"
```
### Result
![Result](screenshot.png)
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: "Setup Cassandra Action"
description: "Running scripts from the provided folder on top of Cassandra cluster."
branding:
icon: database
color: blue
icon: eye-off
color: gray-dark
inputs:
host:
description: "Cassandra host."
Expand Down
17 changes: 9 additions & 8 deletions docker-entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
#!/usr/bin/env bash

msg="fabasoad/setup-cassandra-action GitHub Action is deprecated and no longer"
msg="${msg} maintained."
echo "::warning title=Deprecation warning::${msg}"

paramArray=()
paramArray+=("$1")
paramArray+=("$2")
if [[ -n "${3/[ ]*\n/}" ]]
then
if [[ -n "${3/[ ]*\n/}" ]]; then
paramArray+=("-u")
paramArray+=("$3")
fi
if [[ -n "${4/[ ]*\n/}" ]]
then
if [[ -n "${4/[ ]*\n/}" ]]; then
paramArray+=("-p")
paramArray+=("$4")
fi
paramArray+=("--cqlversion=$CQLSH_VERSION")
paramArray+=("--connect-timeout=$5")
if ! echo "CREATE KEYSPACE IF NOT EXISTS $6 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};" | cqlsh "${paramArray[@]}"
then
command="CREATE KEYSPACE IF NOT EXISTS $6 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
if ! echo "${command}" | cqlsh "${paramArray[@]}"; then
exit 1
fi
for file_script in "$7"/*.cql; do
if ! cqlsh -k "$6" -f "$file_script" "${paramArray[@]}"
then
if ! cqlsh -k "$6" -f "$file_script" "${paramArray[@]}"; then
exit 1
fi
echo "${file_script} had been run"
Expand Down
Binary file removed screenshot.png
Binary file not shown.

0 comments on commit 69ca460

Please sign in to comment.