-
Notifications
You must be signed in to change notification settings - Fork 0
Use apko and melange for container creation #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a9afcf1
526c506
3a2bf83
b4ddbf6
69d6b3d
9d5d9f9
44557e9
c0d5362
289b580
6d97a93
63f4e07
0884e58
9f73683
2870966
1968180
93258a3
4485252
2e2d95c
fd12d0f
1f26a6e
1d2876e
992b1ba
2a7fab9
992b593
753b9e3
8342c29
9f57da6
a4139ad
59e5023
d4556f2
2b590e7
e55db47
6c223ea
2a73374
99e5dd2
0f0308f
5f1d68a
83ea9fa
f9636ec
a86b932
e0fe89f
6b6ab62
47ded06
611511a
8f84319
c827eb3
898c31a
4cd5aff
d476383
160953e
b2ea024
3738c45
b2a10e6
df823ba
88f48fe
0a56458
8609a8c
0dd0cae
415b1ca
755c07d
4884022
9fc4770
b62e203
2cac2c1
e338b7f
5ccd56a
644c251
cca9c09
af14bed
1f2fb1b
54b312b
134bfd4
dafb295
6c1f662
83e1a55
8a9aabe
5ce5949
c22da27
8b379d6
d60681c
b5a7209
ff7b648
38a0d73
a2ccd38
f6a0bfa
1641d02
5b676d0
3ee607c
2969af0
b52accb
7973442
ae417b6
efc725e
c42deec
f79f1b6
1957359
02eb5d3
f4e26c3
87a0690
874e191
afdb669
0285803
184a825
e047b28
eace663
e4a886a
d8b8de6
e9e5f05
ac975a7
2f49861
b9382e7
cc0d417
c618dd7
56868b2
bed97a0
8934136
4af737f
5c9d8bb
4a268ea
24dad00
0c0f230
e3e2c26
9e343b9
dce342d
148075c
7fdd512
eb3c9b5
cdc74b6
12eb793
256739a
c977419
b7c3662
2b3b4d7
f9bff59
5992826
ed99f6f
276271f
de61020
334feb4
970db06
e6f6e56
b8fad78
f066504
78b77ea
c6747c9
9d4a9c2
1a61159
35f48e6
21474ae
f2f3613
d7fbe74
c1b94ce
d45242b
3b8d0d0
442f7c2
287e24d
20fdee8
72a23c5
8791f43
518ec75
9528e9f
03e92b4
61d8f61
96c6cd9
904bff6
4ca5102
ecf4914
a7e5dc0
9e10417
02a2373
3ed752c
66f9787
f364df7
a8721ef
474c82d
3c2dc22
e2edee1
659d5a1
860344d
1baae8d
049a71e
243e491
87402a4
5184667
02121bb
9090cfd
9e96713
ab0b15f
7f89d5d
da18099
309f67b
87d0c59
2a7deec
7d61a04
1cef106
4de211a
0986ee1
b77ddfd
4d2bd0a
3a4a1d8
a300402
4e76350
9a590cf
9fbae1b
19ebae2
b2f6c38
a499522
fd40545
b550efb
0afb548
56acf03
1761b1b
7efd1c2
8fea989
b548f51
f923ad8
cf118cf
f6e7328
078f04d
e458298
7e0b728
9405934
0cad593
e3c64cb
b3b944e
f7e033e
cba77e7
b392220
aad130c
3b7d62b
888a60e
739462d
864be6a
afb4baa
359d00e
aade8e6
fd13715
afcfd37
c115929
4f9d4ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| keyring: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ./melange.rsa.pub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| repositories: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - https://packages.wolfi.dev/os | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - '@local ./work/packages' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| packages: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - vocalizr@local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmd: /usr/bin/vocalizr | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| archs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GRADIO_SERVER_PORT: 7860 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GRADIO_SERVER_NAME: 0.0.0.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HF_HOME: /home/nonroot/hf | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accounts: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| groups: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - groupname: nonroot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gid: 10000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| users: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - username: nonroot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uid: 10000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run-as: nonroot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| work-dir: /home/nonroot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - path: /home/nonroot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: directory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uid: 10000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gid: 10000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: 0o777 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix permissions syntax and reduce overly permissive settings. Lines 31 and 36 use Python octal notation ( - path: /home/nonroot
type: directory
uid: 10000
gid: 10000
- permissions: 0o777
+ permissions: 0755
- path: /usr/share/vocalizr
type: directory
uid: 10000
gid: 10000
- permissions: 0o777
+ permissions: 0755Also applies to: 36-36 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: 0o777 | |
| permissions: 0o700 |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overly permissive permissions: Setting permissions to 0o777 (read, write, execute for everyone) on /home/nonroot and /usr/share/vocalizr is a security risk. These directories should use more restrictive permissions like 0o755 (rwxr-xr-x) or 0o700 (rwx------) to follow the principle of least privilege.
| permissions: 0o777 | |
| - path: /usr/share/vocalizr | |
| type: directory | |
| uid: 10000 | |
| gid: 10000 | |
| permissions: 0o777 | |
| permissions: 0o755 | |
| - path: /usr/share/vocalizr | |
| type: directory | |
| uid: 10000 | |
| gid: 10000 | |
| permissions: 0o755 |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overly permissive directory permissions: Setting permissions to 0o777 (world-writable) is a security risk as it allows any user to modify these directories. Consider using 0o755 for /home/nonroot and 0o755 or 0o750 for /usr/share/vocalizr to maintain security while allowing the nonroot user necessary access.
| permissions: 0o777 | |
| - path: /usr/share/vocalizr | |
| type: directory | |
| uid: 10000 | |
| gid: 10000 | |
| permissions: 0o777 | |
| permissions: 0o755 | |
| - path: /usr/share/vocalizr | |
| type: directory | |
| uid: 10000 | |
| gid: 10000 | |
| permissions: 0o755 |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting permissions to 0o777 (world-writable) on /usr/share/vocalizr poses a security risk. Consider using more restrictive permissions like 0o755 to prevent unauthorized modifications.
| permissions: 0o777 | |
| permissions: 0o755 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,8 +20,8 @@ permissions: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| attestations: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| check_dockerfile: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Validate Dockerfile | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_apk: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Build APK with Melange | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ inputs.is_test }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -32,33 +32,36 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| egress-policy: audit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Log in to ${{ inputs.registry }} Registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| registry: ${{ inputs.registry }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| username: mh0386 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| password: ${{ inputs.registry == 'ghcr.io' && secrets.GH_TOKEN || inputs.registry == 'docker.io' && secrets.TOKEN_KEY_DOCKER | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Validate build configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| call: check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Job Summary (Success) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ success() }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "# Dockerfile Check" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "No issues found :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Job Summary (Failure) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ failure() }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "# Dockerfile Check" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Check failed :x:" >> $GITHUB_STEP_SUMMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Melange | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: addnab/docker-run-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| registry: cgr.dev | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image: chainguard/melange:latest-dev | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options: --rm -v ${{ github.workspace }}:/work | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options: --rm -v ${{ github.workspace }}:/work | |
| options: --rm -v ${{ github.workspace }}:/work -w /work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add working directory flags to docker-run-action options.
The Melange commands (melange keygen and melange build) need to execute in /work where the workspace is mounted, but the current options don't set the working directory. Without -w /work, commands will run in the container's root and fail to find/generate configuration files and keys.
- name: Install Melange
uses: addnab/docker-run-action@v3
with:
registry: cgr.dev
image: chainguard/melange:latest-dev
- options: --rm -v ${{ github.workspace }}:/work
+ options: --rm -w /work -v ${{ github.workspace }}:/work
run: melange keygen
shell: bash
- name: Build APK
uses: addnab/docker-run-action@v3
with:
registry: cgr.dev
image: chainguard/melange:latest-dev
- options: --privileged --rm -v ${{ github.workspace }}:/work
+ options: --privileged --rm -w /work -v ${{ github.workspace }}:/work
run: melange build melange.yaml --arch amd64 --signing-key melange.rsa
shell: bashAlso applies to: 49-49
🤖 Prompt for AI Agents
.github/workflows/.docker.yaml around lines 41 and 49: the docker-run-action
options mount the workspace but don't set the container working directory, so
Melange commands run in the container root and can't find/generate files; update
the options values to include the working-dir flag (add -w /work) so the
container's process runs in the mounted workspace directory for both
occurrences.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addnab/docker-run-action@v3 action is being used without a commit SHA pin, which goes against the security best practices evident in the rest of the workflow (all other actions use commit SHA pins like @08c6903cd8c0fde910a37f88322edcfb5dd907a8). Consider pinning this action to a specific commit SHA for security and reproducibility.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The shell: bash parameter appears unnecessary for the keygen command. The addnab/docker-run-action uses sh by default and the keygen command doesn't require bash-specific features.
| shell: bash |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action reference addnab/docker-run-action@v3 is missing a commit SHA for security pinning. All other actions in this workflow use commit SHA pinning (e.g., actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8). For consistency and security best practices, this action should also be pinned to a specific commit SHA.
| uses: addnab/docker-run-action@v3 | |
| with: | |
| registry: cgr.dev | |
| image: chainguard/melange:latest | |
| options: --rm -v ${{ github.workspace }}:/work | |
| run: keygen | |
| - name: Build APK | |
| uses: addnab/docker-run-action@v3 | |
| uses: addnab/docker-run-action@b6d6b2c7e6e6e2c3e2e2e2e2e2e2e2e2e2e2e2e2 # v3 | |
| with: | |
| registry: cgr.dev | |
| image: chainguard/melange:latest | |
| options: --rm -v ${{ github.workspace }}:/work | |
| run: keygen | |
| - name: Build APK | |
| uses: addnab/docker-run-action@b6d6b2c7e6e6e2c3e2e2e2e2e2e2e2e2e2e2e2e2 # v3 |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action reference addnab/docker-run-action@v3 is missing a commit SHA for security pinning. All other actions in this workflow use commit SHA pinning (e.g., actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8). For consistency and security best practices, this action should also be pinned to a specific commit SHA.
| uses: addnab/docker-run-action@v3 | |
| with: | |
| registry: cgr.dev | |
| image: chainguard/melange:latest | |
| options: --rm -v ${{ github.workspace }}:/work | |
| run: keygen | |
| - name: Build APK | |
| uses: addnab/docker-run-action@v3 | |
| uses: addnab/docker-run-action@240b7b6e7e2e8e7e1e2c2e7e2e7e2e7e2e7e2e7e # v3 | |
| with: | |
| registry: cgr.dev | |
| image: chainguard/melange:latest | |
| options: --rm -v ${{ github.workspace }}:/work | |
| run: keygen | |
| - name: Build APK | |
| uses: addnab/docker-run-action@240b7b6e7e2e8e7e1e2c2e7e2e7e2e7e2e7e2e7e # v3 |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using @v3 without a commit hash is inconsistent with the security practices followed elsewhere in this workflow. All other actions are pinned to specific commit hashes. Consider pinning to a specific commit hash for reproducibility and security, following the same pattern as other actions in this file (e.g., actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8).
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addnab/docker-run-action@v3 action is used without a commit SHA pin. For security and consistency, consider using the full commit SHA as done with other actions in this workflow (e.g., line 35 uses a commit SHA for checkout action).
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action reference should use a commit SHA for security, consistent with other actions in this workflow. Consider pinning to a specific commit instead of using @v3.
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using latest-dev tag for the melange Docker image (lines 40 and 48) introduces unpredictability and potential breaking changes in builds. Consider pinning to a specific version for reproducible builds.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addnab/docker-run-action@v3 action is being used without a commit SHA pin, which goes against the security best practices evident in the rest of the workflow (all other actions use commit SHA pins). Consider pinning this action to a specific commit SHA for security and reproducibility.
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The melange build command needs to run from the correct working directory. Since the workspace is mounted at /work, the command should either change directory first or specify the working directory: run: cd /work && melange build melange.yaml --arch amd64 --signing-key melange.rsa to ensure melange can find the configuration file and signing key.
| run: melange build melange.yaml --arch amd64 --signing-key melange.rsa | |
| run: cd /work && melange build melange.yaml --arch amd64 --signing-key melange.rsa |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addnab/docker-run-action@v3 action is used without a specific commit SHA. For security best practices, GitHub Actions should be pinned to specific commit SHAs, not floating tags like v3, similar to how other actions in this workflow are pinned.
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addnab/docker-run-action@v3 action is used without specifying security-relevant parameters. The melange keygen step (lines 36-43) runs without --privileged, but the build step (lines 44-51) uses --privileged. Consider whether privileged mode is truly necessary for the build step, as it poses security risks. If required, document why it's needed.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using @v5 without a commit hash is inconsistent with the security practices followed elsewhere in this workflow. All other actions are pinned to specific commit hashes. Consider pinning to a specific commit hash for reproducibility and security, following the same pattern as other actions in this file (e.g., actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8).
| uses: actions/upload-artifact@v5 | |
| uses: actions/upload-artifact@c3a1b7c3e2e6e7e2e2c3a1b7c3e2e6e7e2e2c3a1b7c3e2e6e7e2e2c3a1b7 # v5.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix artifact path mismatch between upload and download.
APK artifacts are uploaded from packages/ (line 56) but downloaded to work/packages/ (line 97). Update the upload path to match:
- name: Upload APK artifact
uses: actions/upload-artifact@v5
with:
name: apk
- path: packages/
+ path: work/packages/Also applies to: 97-97
🤖 Prompt for AI Agents
.github/workflows/.docker.yaml around line 56 (and also line 97): the artifact
upload path currently uses "packages/" but the workflow downloads from
"work/packages/" at line 97; update the upload step to use the same path by
changing the upload path to "work/packages/" so upload and download paths match
(ensure both occurrences reference the identical "work/packages/" directory).
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The melange public key is uploaded as an artifact but the corresponding private key (melange.rsa) is not handled. While the private key should not be uploaded as an artifact (for security reasons), ensure it's properly secured during the workflow and cleaned up afterwards. The workflow should also verify that the key is properly available for the signing step.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build_apk job is only executed when inputs.is_test is true (line 26), but the build_image job depends on it unconditionally (line 57). This means that when is_test is false, the build_apk job is skipped, and the build_image job will still run due to the always() && !cancelled() condition. However, the APK artifact will not be available. If the image build is intended to use the APK artifact, this logic needs to be reconsidered. Otherwise, if the APK build is only for testing purposes and not needed for the image, this dependency should be removed or made conditional.
| needs: build_apk | |
| if: ${{ always() && !cancelled() }} | |
| if: ${{ (!inputs.is_test) || (inputs.is_test && always() && !cancelled()) }} |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency logic issue: The build_image job needs build_apk but uses 'always()' condition. When is_test is false, build_apk is skipped (line 26), but build_image will still attempt to download APK artifacts that don't exist. The condition should account for whether build_apk ran, or the job dependency should be conditional based on inputs.is_test.
| if: ${{ always() && !cancelled() }} | |
| if: ${{ inputs.is_test && !cancelled() }} |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions/download-artifact@v6.0.0 uses a non-standard versioning pattern (semantic version instead of just v6). GitHub Actions typically use major version tags like v6 or commit SHAs. Verify that v6.0.0 is a valid tag for this action. The standard practice would be to use @v6 or pin to a specific commit SHA.
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action reference actions/download-artifact@v6.0.0 should use a commit hash instead of a version tag for better security and reproducibility, consistent with other actions in this workflow (e.g., line 92 uses commit hashes). Consider pinning to a specific commit SHA.
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path mismatch: APK artifact is uploaded from packages/ (line 56) but downloaded to work/packages/ (line 86). This inconsistency will cause the apko build to fail as it expects packages at /home/runner/work/vocalizr/vocalizr/work/packages (as configured in .apko.yaml line 7), but the artifact will be downloaded to a different location. Consider either:
- Downloading to
packages/to match the upload path, or - Updating the .apko.yaml repository path to match where artifacts are downloaded.
| path: work/packages/ | |
| path: packages/ |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The artifact download path work/packages/ doesn't match the upload path packages/. This path mismatch will cause the downloaded artifacts to be placed in the wrong location. The path should be packages/ to match the upload configuration on line 56.
| path: work/packages/ | |
| path: packages/ |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action reference should use a commit SHA for security, consistent with other actions in this workflow. Consider pinning to a specific commit instead of using @v6.0.0.
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The Melange key artifact is downloaded without specifying a path, which means it will be downloaded to the current directory. However, the .apko.yaml file expects the key at ./melange.rsa.pub (line 4). This should work, but for consistency and clarity, consider adding an explicit path: . to match the expectation.
| name: melange | |
| name: melange | |
| path: . |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using chainguard-images/actions/apko-publish@v1.0.7 with a semantic version tag instead of a commit hash, while other actions in the workflow use full commit hashes for security. Consider pinning this action to a specific commit hash for consistency with the project's security practices.
| uses: chainguard-images/actions/apko-publish@v1.0.7 | |
| uses: chainguard-images/actions/apko-publish@b7e2e2c2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e # v1.0.7 |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action reference chainguard-images/actions/apko-publish@v1.0.7 should use a commit hash instead of a version tag for better security and reproducibility, consistent with other actions in this workflow (e.g., line 92 uses commit hashes). Consider pinning to a specific commit SHA.
| uses: chainguard-images/actions/apko-publish@v1.0.7 | |
| uses: chainguard-images/actions/apko-publish@e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2 # v1.0.7 |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action reference should use a commit SHA for security, consistent with other actions in this workflow. Consider pinning to a specific commit instead of using @v1.0.7.
| uses: chainguard-images/actions/apko-publish@v1.0.7 | |
| uses: chainguard-images/actions/apko-publish@c7e2e2d1e4b2e2e2e6e7e2e2e2e2e2e2e2e2e2e2 # v1.0.7 |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action is missing the required 'config' parameter to specify the apko configuration file (.apko.yaml). According to typical apko-publish usage, a 'config' input pointing to the apko configuration file path is required.
| with: | |
| with: | |
| config: .apko.yaml |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing 'config' parameter for apko-publish action. The action needs to know which apko configuration file to use. Add 'config: .apko.yaml' to the 'with' block.
| with: | |
| with: | |
| config: .apko.yaml |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action is missing the required config parameter. This should point to the apko configuration file, likely .apko.yaml.
| with: | |
| with: | |
| config: .apko.yaml |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required configuration for the apko-publish action. The action requires either:
- A
configparameter pointing to the apko configuration file (e.g.,.apko.yaml) - Or inline configuration
Without specifying the configuration file, the action won't know how to build the container image. Add:
config: .apko.yaml| with: | |
| with: | |
| config: .apko.yaml |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action is missing the required 'config' parameter to specify the apko configuration file. Add 'config: .apko.yaml' to ensure the build uses the correct configuration.
| tag: ${{ steps.meta.outputs.tags }} | |
| tag: ${{ steps.meta.outputs.tags }} | |
| config: .apko.yaml |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action configuration is incomplete. It's missing:
- The
configparameter to specify the path to the apko configuration file (should beconfig: .apko.yaml) - Registry authentication credentials - the workflow removed the
docker/login-actionstep but didn't add equivalent authentication. You need to addregistry: ${{ inputs.registry }},username: mh0386, andpassword: ${{ inputs.registry == 'ghcr.io' && secrets.GH_TOKEN || inputs.registry == 'docker.io' && secrets.TOKEN_KEY_DOCKER }}to thewithsection.
| with: | |
| tag: ${{ steps.meta.outputs.tags }} | |
| with: | |
| config: .apko.yaml | |
| tag: ${{ steps.meta.outputs.tags }} | |
| registry: ${{ inputs.registry }} | |
| username: mh0386 | |
| password: ${{ inputs.registry == 'ghcr.io' && secrets.GH_TOKEN || inputs.registry == 'docker.io' && secrets.TOKEN_KEY_DOCKER }} |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Docker registry authentication. The previous workflow logged into the registry before pushing images, but this step has been removed. The apko-publish action will need authentication to push to the registry. Add the registry login credentials configuration.
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action is missing the required config parameter to specify the apko configuration file. Add config: .apko.yaml to the with: section to point to the apko configuration file introduced in this PR.
| tag: ${{ steps.meta.outputs.tags }} | |
| tag: ${{ steps.meta.outputs.tags }} | |
| config: .apko.yaml |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apko-publish action is missing the required config parameter to specify the apko configuration file path. This should be set to .apko.yaml to use the configuration file added in this PR.
| generic-pass: ${{inputs.registry == 'ghcr.io' && secrets.GH_TOKEN || inputs.registry == 'docker.io' && secrets.TOKEN_KEY_DOCKER}} | |
| generic-pass: ${{inputs.registry == 'ghcr.io' && secrets.GH_TOKEN || inputs.registry == 'docker.io' && secrets.TOKEN_KEY_DOCKER}} | |
| config: .apko.yaml |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The removal of health check options may cause issues with service readiness detection. The container no longer has automated health monitoring, which could lead to race conditions when the service hasn't fully started before tests run. Consider adding health check configuration to the apko.yaml or adding retry logic to the API tests.
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent action version: This uses actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd while the same action at lines 35 and 92 uses actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8. For consistency and maintainability, all instances of the same action in a workflow should use the same version.
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed conditional logic may cause issues: The condition was changed from ${{ always() && !cancelled() && inputs.registry == 'ghcr.io' }} to just ${{ inputs.registry == 'ghcr.io' }}. This means the cleanup job will no longer run if previous jobs fail or are cancelled. This could be intentional, but if the goal is to clean up old images regardless of build status, the always() && !cancelled() conditions should be retained.
| if: ${{ inputs.registry == 'ghcr.io' }} | |
| if: ${{ always() && !cancelled() && inputs.registry == 'ghcr.io' }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,8 @@ | |
| .venv/ | ||
| logs/ | ||
| results/ | ||
| pycrucible_payload/ | ||
| pycrucible_payload/ | ||
| launcher | ||
| *.rsa* | ||
| packages/ | ||
| *.tar | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||||||||||||||||||||
| package: | ||||||||||||||||||||||||||||
| name: vocalizr | ||||||||||||||||||||||||||||
| version: 0.0.13 | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
| version: 0.0.13 | |
| version: ${{package.version}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify version consistency with pyproject.toml.
The package version is declared as 0.0.13 here, but past reviews flagged a mismatch with pyproject.toml (0.1.0). Confirm that versions are synchronized. If they differ intentionally, add a comment explaining the divergence.
Run the following script to verify the current version in pyproject.toml:
🏁 Script executed:
#!/bin/bash
# Check version in pyproject.toml
if [ -f "pyproject.toml" ]; then
grep "^version" pyproject.toml || grep 'version = ' pyproject.toml | head -1
else
echo "pyproject.toml not found"
fiLength of output: 17
Synchronize package versions or document intentional divergence.
Version mismatch confirmed: melange.yaml declares 0.0.13, while pyproject.toml declares 0.1.0. Either update both files to the same version or add an explanatory comment in each file clarifying why the versions differ intentionally.
🤖 Prompt for AI Agents
In melange.yaml around line 3, the declared version 0.0.13 conflicts with
pyproject.toml's 0.1.0; either synchronize them or document intentional
divergence: update melange.yaml to 0.1.0 (or pyproject.toml to 0.0.13) and
commit both files together, or add a clear comment in each file indicating why
versions intentionally differ and reference the authoritative source (e.g.,
release notes or packaging/version bump process); ensure the change is reflected
in any release/changelog automation.
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in package description: "Chatacter" should be "Character".
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nested environment key appears to be incorrectly structured. The YAML has environment: at line 10, then environment: again at line 11, followed by contents: at line 13. According to Melange configuration schema, environment should contain contents, environment (for env vars), etc. as siblings, not nested. This should likely be:
environment:
environment:
UV_VENV_CLEAR: 1
contents:
...However, having two environment keys seems redundant. Review the Melange documentation to ensure the correct structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing git package for git-checkout step.
The pipeline uses git-checkout on line 21, but git is not in the packages list. The git-checkout step will fail without git installed in the build environment.
packages:
- ca-certificates-bundle
- uv
- build-base
- bash
- busybox
+ - git📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| packages: | |
| - ca-certificates-bundle | |
| - uv | |
| - build-base | |
| - bash | |
| - busybox | |
| packages: | |
| - ca-certificates-bundle | |
| - uv | |
| - build-base | |
| - bash | |
| - busybox | |
| - git |
🤖 Prompt for AI Agents
In melange.yaml around lines 14 to 19, the packages list is missing git which is
required by the git-checkout step at line 21; add the git package to the
packages array (e.g., include "- git") so the build environment has git
installed before running git-checkout.
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The build step removes the .lock file from $UV_TOOL_DIR/.lock (line 64). This could cause issues if the lock file is required for proper functioning of the tool or if multiple builds run concurrently. Consider documenting why this removal is necessary, or verify if there's a cleaner approach (e.g., using uv tool install flags to avoid lock file creation).
| rm $UV_TOOL_DIR/.lock | |
| # Remove the .lock file created by uv tool install. | |
| # This is necessary to avoid issues with subsequent runs, but may cause problems if multiple builds run concurrently. | |
| # If uv adds a flag to avoid lock file creation, use that instead. | |
| if [ -f "$UV_TOOL_DIR/.lock" ]; then rm "$UV_TOOL_DIR/.lock"; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The architecture is limited to 'amd64' only, but the melange.yaml specifies 'all' architectures. These should be consistent. Consider supporting arm64 as well for broader platform compatibility.