Skip to content

Fix/manifest creation retry logic#37

Merged
fok666 merged 4 commits intomainfrom
fix/manifest-creation-retry-logic
Mar 8, 2026
Merged

Fix/manifest creation retry logic#37
fok666 merged 4 commits intomainfrom
fix/manifest-creation-retry-logic

Conversation

@fok666
Copy link
Owner

@fok666 fok666 commented Mar 8, 2026

No description provided.

Fernando Korndorfer added 3 commits March 8, 2026 09:59
Refactored workflow to extract versions once in a dedicated job and
reuse outputs across all dependent jobs, eliminating code duplication
and ensuring consistency.

Changes:
- Added extract-versions job that runs first and outputs agent/os versions
- All other jobs now depend on extract-versions and use needs.extract-versions.outputs
- Removed duplicate version extraction code from build-and-test, build-push, and create-manifest jobs
- Ensures version consistency across all pipeline stages

Benefits:
- Single source of truth for version numbers
- Eliminates risk of version mismatches between jobs
- Reduces workflow complexity and maintenance burden
- Improves reliability by ensuring all jobs use identical versions
@fok666 fok666 self-assigned this Mar 8, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing project documentation. It introduces a detailed guide for GitHub Copilot, providing comprehensive information on the project's architecture, Docker image profiles, coding standards, and operational aspects for self-hosted GitHub Actions runners. Additionally, it refines the main README.md by removing obsolete build argument descriptions and updating usage examples for consistency with current image tagging. The PR title "Fix/manifest creation retry logic" does not align with the provided changes, which are purely documentation updates.

Highlights

  • New Copilot Instructions Document: A new, comprehensive documentation file (.github/copilot-instructions.md) has been added. This document details the project overview, repository structure, Docker image profiles, multi-stage build hierarchy, common commands, architecture patterns, coding standards, testing, versioning, termination handling, common pitfalls, and security considerations for GitHub Actions self-hosted runners.
  • README.md Updates: The README.md file has been updated to remove a section describing ADD_ build arguments, as these are no longer relevant. Additionally, example commands for running self-hosted runners have been modified to consistently use the latest-full Docker image tag.
Changelog
  • .github/copilot-instructions.md
    • Added a new file containing detailed instructions and guidelines for GitHub Copilot usage within the project.
  • README.md
    • Removed a list of ADD_ arguments that are no longer applicable.
    • Updated example run.sh commands to specify the latest-full Docker image tag.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/docker-image.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates documentation files, including adding a comprehensive copilot-instructions.md guide and updating the README.md. The changes improve the documentation by removing outdated information and clarifying usage examples.

However, the PR title "Fix/manifest creation retry logic" does not seem to match the content of the changes, which are purely documentation-related. Could you please clarify if there are missing code changes or if the title should be updated to reflect the documentation improvements?

I've added a couple of suggestions to the new copilot-instructions.md file to correct some details regarding GitHub Actions versions and token types.

Note: Security Review has been skipped due to the limited scope of the PR.

- Matrix strategy for profiles and platforms:
- **PR builds**: `full` profile only, both `linux/amd64` + `linux/arm64`
- **Push to main**: all profiles, `linux/amd64` only
- Always use `actions/checkout@v6` as the first step

Choose a reason for hiding this comment

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

medium

The documentation suggests using actions/checkout@v6, but this version does not exist. The latest major version for actions/checkout is v4. Please update the documentation to reflect a valid version.

Suggested change
- Always use `actions/checkout@v6` as the first step
- Always use `actions/checkout@v4` as the first step

## Common Pitfalls

- **TARGETARCH vs runner arch**: GitHub runner archives use `x64` (not `amd64`) — always map with `$([ "${TARGETARCH}" = "amd64" ] && echo "x64" || echo "arm64")`
- **Runner registration token vs PAT**: `run.sh` expects a short-lived registration token (starts with `ghs-` or `ghp-`), not a PAT

Choose a reason for hiding this comment

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

medium

The guidance on tokens is confusing. It incorrectly states that run.sh does not accept a PAT, while also listing a PAT prefix (ghp-). This contradicts the run.sh script's help text, which states it accepts both. To improve clarity, please update the text to reflect that both token types are supported and correct the token prefixes mentioned (e.g., ghs_ for registration tokens).

Suggested change
- **Runner registration token vs PAT**: `run.sh` expects a short-lived registration token (starts with `ghs-` or `ghp-`), not a PAT
- **Runner registration token vs PAT**: The `run.sh` script accepts either a short-lived registration token (starts with `ghs_`) or a Personal Access Token (PAT, which typically starts with `ghp_`).

The job-level outputs referenced needs.extract-versions.outputs.* (self-
referential), which always resolves to empty strings. This caused all
downstream jobs to receive an empty AGENT_VERSION build-arg, resulting in
a failed Docker build when constructing the runner download URL.

Fix outputs to reference steps.versions.outputs.* as intended.
@fok666
Copy link
Owner Author

fok666 commented Mar 8, 2026

Root cause of CI failure found and fixed (commit b378222)

The extract-versions job had self-referential outputs:

# BEFORE (broken)
outputs:
  agent: ${{ needs.extract-versions.outputs.agent }}  # references itself → always empty
  os: ${{ needs.extract-versions.outputs.os }}

needs.<job>.outputs.* is only valid in other jobs that depend on this one. Using it inside the same job's outputs: block is a circular reference — GitHub Actions resolves it to an empty string. This caused AGENT_VERSION= (empty) to be passed as a Docker build-arg, overriding the Dockerfile default and breaking the runner download URL.

# AFTER (fixed)
outputs:
  agent: ${{ steps.versions.outputs.agent }}
  os: ${{ steps.versions.outputs.os }}

This correctly propagates the version extracted by the id: versions step to all downstream jobs (build-and-test, build-push, create-manifest).

@fok666 fok666 merged commit 819420c into main Mar 8, 2026
10 checks passed
@fok666 fok666 deleted the fix/manifest-creation-retry-logic branch March 8, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant