Skip to content

Commit

Permalink
Merge remote-tracking branch 'old-fork/oreilly-main' into oreilly-mai…
Browse files Browse the repository at this point in the history
…n-merge
  • Loading branch information
corybekk committed Nov 6, 2024
2 parents 1ba4abc + 336fed8 commit ba25a7d
Show file tree
Hide file tree
Showing 64 changed files with 4,452 additions and 93 deletions.
132 changes: 132 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Distributed via https://github.com/rebuy-de/terraform-cluster-config
# Modify only there, changes in project repos will be overwritten

root = true

[openapi-spec.yaml]
ij_formatter_enabled = false

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true
ij_smart_tabs = false
ij_visual_guides =
ij_wrap_on_typing = false

[{*.htm,*.html,*.sht,*.shtm,*.shtml}]
ij_html_attribute_wrap = off
ij_html_do_not_indent_children_of_tags =
ij_html_keep_blank_lines = 1
ij_html_text_wrap = off

[{*.cjs,*.js}]
ij_javascript_do_while_brace_force = always
ij_javascript_for_brace_force = always
ij_javascript_if_brace_force = always
ij_javascript_keep_blank_lines_in_code = 1
ij_javascript_use_double_quotes = false
ij_javascript_while_brace_force = always

[{*.ats,*.cts,*.mts,*.ts}]
ij_typescript_do_while_brace_force = always
ij_typescript_for_brace_force = always
ij_typescript_if_brace_force = always
ij_typescript_import_prefer_absolute_path = true
ij_typescript_keep_blank_lines_in_code = 1
ij_typescript_space_before_function_left_parenth = false
ij_typescript_use_double_quotes = false
ij_typescript_while_brace_force = always

[*.coffee]
indent_size = 2

[*.java]
ij_continuation_indent_size = 4
ij_java_blank_lines_around_field = 1
ij_java_blank_lines_around_initializer = 0
ij_java_class_brace_style = next_line
ij_java_class_count_to_use_import_on_demand = 99
ij_java_do_while_brace_force = always
ij_java_doc_add_blank_line_after_param_comments = true
ij_java_doc_add_blank_line_after_return = true
ij_java_for_brace_force = always
ij_java_if_brace_force = always
ij_java_keep_blank_lines_before_right_brace = 0
ij_java_keep_blank_lines_in_code = 1
ij_java_keep_blank_lines_in_declarations = 0
ij_java_keep_simple_classes_in_one_line = true
ij_java_keep_simple_lambdas_in_one_line = true
ij_java_method_brace_style = next_line
ij_java_names_count_to_use_import_on_demand = 99
ij_java_new_line_after_lparen_in_record_header = true
ij_java_packages_to_use_import_on_demand =
ij_java_record_components_wrap = on_every_item
ij_java_rparen_on_new_line_in_record_header = true
ij_java_while_brace_force = always

[{*.kt,*.kts}]
ij_continuation_indent_size = 4
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_packages_to_use_import_on_demand =

[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}]
ij_php_align_multiline_parameters = false
ij_php_blank_lines_around_field = 1
ij_php_blank_lines_before_return_statement = 1
ij_php_comma_after_last_array_element = true
ij_php_force_short_declaration_array_style = true
ij_php_keep_blank_lines_before_right_brace = 0
ij_php_keep_blank_lines_in_code = 1
ij_php_keep_blank_lines_in_declarations = 0
ij_php_keep_rparen_and_lbrace_on_one_line = true
ij_php_lower_case_boolean_const = true
ij_php_lower_case_null_const = true
ij_php_method_parameters_new_line_after_left_paren = true
ij_php_method_parameters_right_paren_on_new_line = true
ij_php_phpdoc_blank_line_before_tags = true
ij_php_phpdoc_blank_lines_around_parameters = true
ij_php_space_after_type_cast = true
ij_php_space_before_short_closure_left_parenthesis = true

[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.pom,*.rng,*.tld,*.wadl,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
ij_xml_space_inside_empty_tag = true

[{*.tf,*.tfvars,*.hcl}]
tab_width = 2
ij_continuation_indent_size = 4

[*.less]
tab_width = 2
ij_continuation_indent_size = 2

[*.sass]
tab_width = 2
ij_continuation_indent_size = 2

[*.scala]
ij_scala_do_while_brace_force = always
ij_scala_for_brace_force = always
ij_scala_if_brace_force = always
ij_scala_keep_blank_lines_before_right_brace = 0
ij_scala_keep_blank_lines_in_code = 0
ij_scala_keep_blank_lines_in_declarations = 0
ij_scala_multiline_string_closing_quotes_on_new_line = false

[*.scss]
ij_continuation_indent_size = 4

[{*.yaml,*.yml}]
ij_yaml_spaces_within_braces = false
ij_yaml_spaces_within_brackets = false
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
day: "tuesday"
time: "10:00"
timezone: "Europe/Berlin"
groups:
golang:
patterns:
- "*"
13 changes: 13 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes

changelog:
categories:
- title: Notable changes
labels:
- '*'
exclude:
labels:
- dependencies
- title: Dependency updates
labels:
- dependencies
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Golang CI

on:
push:
branches: [oreilly-main]
pull_request:
types: [opened, reopened, synchronize]
schedule:
- cron: '15 3 * * 0'
workflow_dispatch:

jobs:
build:
name: CI Build
runs-on: ubuntu-22.04
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Setup tools
run: |
go install golang.org/x/lint/golint@latest
- name: Checkout code
uses: actions/checkout@v4
- name: Check Formatting
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "### Go formatting is off, please execute 'gofmt -w -s .' - see following diff: ###"
gofmt -s -d .
exit 1
fi
- name: Test Project
run: |
make test
- name: Build Project
run: |
make
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish release artifacts

on:
release:
types: [created]

jobs:
update_readme:
name: Update Readme
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Update versions in readme
run: |
sed -r -i "s/aws-nuke:v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke:${{ github.ref_name }}/" README.md
sed -r -i "s/aws-nuke-v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke-${{ github.ref_name }}/" README.md
sed -r -i "s/\/v[0-9]+\.[0-9]+\.[0-9]+\//\/${{ github.ref_name }}\//" README.md
- uses: peter-evans/create-pull-request@v6
name: Create Pull Request
with:
title: Update readme for ${{ github.ref_name }} release
commit-message: Update readme for ${{ github.ref_name }} release
body: Updating version references in the readme to ${{ github.ref_name }}
branch: update-readme-${{ github.ref_name }}
delete-branch: true

release:
name: Publish binaries
runs-on: ubuntu-22.04
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Project binaries
env:
CGO_ENABLED: 0
run: |
make xc
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/aws*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
Loading

0 comments on commit ba25a7d

Please sign in to comment.