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
51 changes: 51 additions & 0 deletions .github/workflows/e2e-action-commit-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,57 @@ jobs:
git push origin --delete "${branch}"
fi

commit-with-custom-identity:
name: Commit with custom user_name and user_email
needs: [preflight]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Create test file
run: echo "E2E identity override test $(date -u)" > e2e-identity-override.md

- name: Commit with custom identity
if: ${{ inputs.mode == 'ref' }}
id: commit
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: "test(commit-push): custom identity test"
target_branch: test/e2e-commit-push-identity-${{ github.run_id }}
user_name: "Release Automation"
user_email: "release-bot@example.com"

- name: Commit via docker image (preview)
if: ${{ inputs.mode == 'image' }}
run: |
if [ -z "${{ inputs.image_tag }}" ]; then
echo "image_tag is required when mode=image"
exit 1
fi
echo "Image mode placeholder for devopsinfra/action-commit-push:${{ inputs.image_tag }}"
echo "Use ref mode for authoritative validation until image-mode harness is finalized."

- name: Verify commit identity
if: ${{ inputs.mode == 'ref' }}
run: |
git fetch origin "test/e2e-commit-push-identity-${{ github.run_id }}"
test "$(git log -1 --format=%an "origin/test/e2e-commit-push-identity-${{ github.run_id }}")" = "Release Automation"
test "$(git log -1 --format=%ae "origin/test/e2e-commit-push-identity-${{ github.run_id }}")" = "release-bot@example.com"
test "$(git log -1 --format=%cn "origin/test/e2e-commit-push-identity-${{ github.run_id }}")" = "Release Automation"
test "$(git log -1 --format=%ce "origin/test/e2e-commit-push-identity-${{ github.run_id }}")" = "release-bot@example.com"

- name: Cleanup - delete test branch
if: ${{ always() && inputs.mode == 'ref' }}
run: |
branch="test/e2e-commit-push-identity-${{ github.run_id }}"
if git ls-remote --exit-code --heads origin "${branch}" >/dev/null 2>&1; then
git push origin --delete "${branch}"
fi

reset-target-branch-to-base:
name: Reset target branch to base branch
needs: [preflight]
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ In Slavic mythology, Triglav represents three realms. That maps well to this fra

## Covered Actions and Test Types

| Action | Workflow | Test Coverage |
|------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `devops-infra/action-commit-push` | `.github/workflows/e2e-action-commit-push.yml` | branch creation/push, custom message/prefix, empty commit mode, amend with force-with-lease, GPG and SSH signed commits, output verification, cleanup |
| `devops-infra/action-pull-request` | `.github/workflows/e2e-action-pull-request.yml` | PR creation/update paths, custom title/body, draft + `get_diff`, `repository` + `repository_path`, output verification, cleanup |
| `devops-infra/action-format-hcl` | `.github/workflows/e2e-action-format-hcl.yml` | check mode pass/fail, write mode, list/diff mode, malformed input detection |
| `devops-infra/action-container-structure-test` | `.github/workflows/e2e-action-container-structure-test.yml` | text/json/junit output modes, report file creation, multi-config execution, output counters |
| `devops-infra/action-terraform-copy-vars` | `.github/workflows/e2e-action-terraform-copy-vars.yml` | variable propagation across modules, custom path inputs, strict missing-variable failure mode |
| `devops-infra/action-terraform-validate` | `.github/workflows/e2e-action-terraform-validate.yml` | valid module validation, scoped validation via `dir_filter` |
| `devops-infra/action-tflint` | `.github/workflows/e2e-action-tflint.yml` | lint execution across modules, scoped lint via `dir_filter`, non-blocking findings mode |
| `devops-infra/template-action` | `.github/workflows/e2e-action-template-action.yml` | baseline template behavior validation, output contract checks, debug-mode execution |
| Action | Workflow | Test Coverage |
|------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `devops-infra/action-commit-push` | `.github/workflows/e2e-action-commit-push.yml` | branch creation/push, custom message/prefix, custom commit name/email, empty commit mode, amend with force-with-lease, GPG and SSH signed commits, output verification, cleanup |
| `devops-infra/action-pull-request` | `.github/workflows/e2e-action-pull-request.yml` | PR creation/update paths, custom title/body, draft + `get_diff`, `repository` + `repository_path`, output verification, cleanup |
| `devops-infra/action-format-hcl` | `.github/workflows/e2e-action-format-hcl.yml` | check mode pass/fail, write mode, list/diff mode, malformed input detection |
| `devops-infra/action-container-structure-test` | `.github/workflows/e2e-action-container-structure-test.yml` | text/json/junit output modes, report file creation, multi-config execution, output counters |
| `devops-infra/action-terraform-copy-vars` | `.github/workflows/e2e-action-terraform-copy-vars.yml` | variable propagation across modules, custom path inputs, strict missing-variable failure mode |
| `devops-infra/action-terraform-validate` | `.github/workflows/e2e-action-terraform-validate.yml` | valid module validation, scoped validation via `dir_filter` |
| `devops-infra/action-tflint` | `.github/workflows/e2e-action-tflint.yml` | lint execution across modules, scoped lint via `dir_filter`, non-blocking findings mode |
| `devops-infra/template-action` | `.github/workflows/e2e-action-template-action.yml` | baseline template behavior validation, output contract checks, debug-mode execution |

## Workflow Orchestration

Expand Down