Skip to content

Fix name of generated of artifact builds from GitHub workflow for arm artifacts - #3568

Merged
TingluoHuang merged 1 commit into
actions:mainfrom
satmandu:build_fix
Nov 13, 2024
Merged

TingluoHuang merged 1 commit into
actions:mainfrom
satmandu:build_fix

Conversation

@satmandu

Copy link
Copy Markdown
Contributor

The tar.gz file names generated from the build.yml workflow inside runner-package-${{ matrix.runtime }}.zip are all named actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz

The logic in src/dev.sh is:

DEV_TARGET_RUNTIME=$3
...
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
    RUNTIME_ID="linux-x64"
    if command -v uname > /dev/null; then
        CPU_NAME=$(uname -m)
        case $CPU_NAME in
            armv7l) RUNTIME_ID="linux-arm";;
            aarch64) RUNTIME_ID="linux-arm64";;
        esac
    fi
...
if [[ -n "$DEV_TARGET_RUNTIME" ]]; then
    RUNTIME_ID="$DEV_TARGET_RUNTIME"
fi
...
    runner_pkg_name="actions-runner-${RUNTIME_ID}-${runner_ver}"

    heading "Packaging ${runner_pkg_name}"
...
    if [[ ("$CURRENT_PLATFORM" == "linux") || ("$CURRENT_PLATFORM" == "darwin") ]]; then
        tar_name="${runner_pkg_name}.tar.gz"
        echo "Creating $tar_name in ${LAYOUT_DIR}"
        tar -czf "${tar_name}" -C "${LAYOUT_DIR}" .

But RUNTIME_ID never gets set for the arm packages since those are cross-compiled on linux-x64.

This is a small fix for that.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
@satmandu
satmandu requested a review from a team as a code owner November 13, 2024 17:55
@satmandu satmandu changed the title Fix generation of artifact builds from GitHub workflow for arm artifacts Fix name of generated of artifact builds from GitHub workflow for arm artifacts Nov 13, 2024
@satmandu

satmandu commented Nov 13, 2024 •

Copy link
Copy Markdown
Contributor Author

@TingluoHuang I guess you've already tagged a release...

@TingluoHuang
TingluoHuang enabled auto-merge (squash) November 13, 2024 18:04
@TingluoHuang
TingluoHuang merged commit e640a9f into actions:main Nov 13, 2024
@satmandu
satmandu deleted the build_fix branch November 13, 2024 18:13
johngeorgewright pushed a commit to johngeorgewright/actions-runner that referenced this pull request Nov 25, 2024
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
fmartinez255 pushed a commit to TiVo/actions-runner that referenced this pull request Dec 2, 2024
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
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.

2 participants