Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Comment thread
flaxel marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test the whole refactored implementation already in another repository? 🤔

Copy link
Copy Markdown
Contributor Author

@0x46616c6b 0x46616c6b Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR includes 64 unit tests that cover all extracted bash logic (tag generation, architecture validation, retagging, GitOps updates, deployment annotations). These validate the refactored scripts behave identically to the original inline bash.

I will test it today and report back.

Copy link
Copy Markdown
Contributor Author

@0x46616c6b 0x46616c6b Apr 23, 2026

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read

jobs:
lint:
name: Shellcheck
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install mise
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2

- name: Run shellcheck
run: mise run lint

test:
name: Bash Tests
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install mise
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2

- name: Run tests
run: mise run test

validate-action:
name: Validate Action Structure
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Verify all referenced scripts exist
run: |
grep -oP 'github\.action_path \}\}/\K[^ "]+' action.yml | while read -r script; do
if [[ ! -f "$script" ]]; then
echo "::error::Script referenced in action.yml does not exist: $script"
exit 1
fi
done

- name: Verify scripts are executable
run: |
find scripts/ -name '*.sh' | while read -r script; do
if [[ ! -x "$script" ]]; then
echo "::error::Script is not executable: $script"
exit 1
fi
done
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# Intellij
.idea/*

# Node
node_modules/
package.json
package-lock.json

# Test helper libraries (installed during CI/local setup)
tests/test_helper/bats-support/
tests/test_helper/bats-assert/

# Test artifacts
headers.txt
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shell=bash
external-sources=true
Loading
Loading