Commit graph

12 commits

Author SHA1 Message Date
renovate[bot]
828f73d481
⬆️ Update actions/checkout action to v6 (#1352)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 13:59:40 -08:00
lenucksi
9c7a95f696
fix(ci): fix broken Docker workflow and modernize (#1318)
* fix(ci): fix broken Docker workflow and modernize

## Critical Bug Fixes

1. **Fix broken push condition** (CRITICAL):
   - Old: `push: ${{ github.ref == 'refs/heads/master' }}`
   - Problem: Branch renamed to `main`, so images NEVER pushed
   - New: `push: ${{ github.event_name != 'pull_request' }}`
   - Result: Docker images will actually be published again

2. **Add missing checkout step**:
   - Build was failing because source code wasn't checked out
   - Required for Docker build context

## Modernization Improvements

3. **Migrate to GitHub Container Registry (GHCR)**:
   - Old: DockerHub with `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` secrets
   - New: GHCR with built-in `GITHUB_TOKEN`
   - Benefits: No external account required, better integration

4. **Add semantic versioning**:
   - Automatically tags releases: `v1.2.3`, `v1.2`, `v1`, `latest`
   - Supports version tags (v*), branches, and PRs
   - Uses docker/metadata-action for automatic tagging

5. **Add GitHub Actions caching**:
   - Uses `type=gha` cache for faster builds
   - Reduces build times and GitHub Actions minutes

6. **Security: Digest pinning**:
   - All actions pinned to commit SHAs
   - Prevents supply chain attacks via tag manipulation
   - Follows security best practices

7. **Add explicit permissions**:
   - Minimal required permissions (contents: read, packages: write)
   - Follows principle of least privilege

8. **Add workflow triggers**:
   - Tags (v*) for releases
   - Pull requests for testing
   - Manual dispatch for on-demand builds

## Testing

- Workflow syntax validated
- Push logic tested with different event types
- Compatible with existing Docker build process

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(ci): simplify docker workflow

- Use version tags instead of SHA pins for readability
- Remove verbose step names (action names are self-documenting)
- Compact YAML formatting
- Fix actions/checkout to v4 (v6 doesn't exist)

---------

Co-authored-by: Bas Nijholt <bas@nijho.lt>
2025-12-12 13:49:45 -08:00
renovate[bot]
57c36133f7
⬆️ Update docker/build-push-action action to v6 (#1113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 21:42:14 +02:00
renovate[bot]
dd1090cf52
⬆️ Update docker/login-action action to v3 (#1114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 21:42:07 +02:00
renovate[bot]
b8306c2b21
⬆️ Update docker/setup-buildx-action action to v3 (#1115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 21:41:54 +02:00
renovate[bot]
584368c1a4
⬆️ Update docker/setup-qemu-action action to v3 (#1116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 21:41:49 +02:00
Bas Nijholt
db40b9af6b
Only build Docker image on main (#648) 2023-07-21 18:08:43 -07:00
Bas Nijholt
cc8ce29a8a
Auto-generate the configuration options documentation (#498)
* Autogenerate the documentation and strings

* Line limit

* Split

* Happy pre-commit

* Split up workflows

* Generate table function

* raise

* Add gen script

* chore(docs): update TOC

* Add gen script

* path

* Run - name: Install Home Assistant

* chore(docs): update TOC

* add copyright

* Fix branch name

* Run on PRs

* dev

* remove steps

* use matrix

* Run script

* chore(docs): update TOC

* Try fixing CI

* fix

* test

* refactor

* chore(docs): update TOC

* fix

* update

* use v3

* rename

* Fix input

* fix pytest

* fix path

* paths

* Change to github.head_ref

* More backticks

* Add extra text

* chore(docs): update TOC

* backticks

* Update README.md

---------

Co-authored-by: basnijholt <basnijholt@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-01 23:43:20 -07:00
Bas Nijholt
491aca696c
Add linux/arm64 to build platform of Docker image (#476)
* Add linux/arm64 to build platform of Docker image

* Fix url
2023-03-27 03:00:12 +00:00
Bas Nijholt
1fb364949e
Fix name of Docker image (#478) 2023-03-27 02:39:57 +00:00
Bas Nijholt
f408f330c1
Disable Docker image builds on ARM for now (#475) 2023-03-26 19:14:19 -07:00
Bas Nijholt
1b08e8e6ba
Add testing Dockerfile (#470)
* Add testing Dockerfile

* Add comments

* Format table

* Add tests/README.md

* Rephrase

* add note in dockerfile
2023-03-27 01:18:18 +00:00