@@ -17,12 +17,16 @@ jobs:
1717        base_os :
1818          - alpine:3.20 
1919          - debian:bookworm-slim 
20-         github_cli_version :
21-           - 2.60.0 
2220    steps :
2321      - name : Check out code. 
2422        uses : actions/checkout@v4 
2523
24+       - name : Read GitHub CLI version 
25+         id : gh_version 
26+         run : | 
27+           GH_VERSION=$(cat github-cli-build-version.txt | tr -d '\n') 
28+           echo "version=${GH_VERSION}" >> $GITHUB_OUTPUT 
29+ 
2630name : Login to DockerHub 
2731        uses : docker/login-action@v3 
2832        with :
@@ -62,14 +66,14 @@ jobs:
6266          BASE_OS_TRIMMED=$(echo ${{ matrix.base_os }} | cut -d':' -f1) 
6367           
6468          # Build tags string directly 
65-           DOCKER_TAGS="docker.io/serversideup/github-cli:${BASE_OS_TRIMMED}-${{ matrix.github_cli_version  }}" 
66-           DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${BASE_OS_TRIMMED}-${{ matrix.github_cli_version  }}" 
69+           DOCKER_TAGS="docker.io/serversideup/github-cli:${BASE_OS_TRIMMED}-${{ steps.gh_version.outputs.version  }}" 
70+           DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${BASE_OS_TRIMMED}-${{ steps.gh_version.outputs.version  }}" 
6771          DOCKER_TAGS="${DOCKER_TAGS},docker.io/serversideup/github-cli:${BASE_OS_TRIMMED}" 
6872          DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${BASE_OS_TRIMMED}" 
6973           
7074          if [[ "${{ matrix.base_os }}" == "debian"* ]]; then 
71-             DOCKER_TAGS="${DOCKER_TAGS},docker.io/serversideup/github-cli:${{ matrix.github_cli_version  }}" 
72-             DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${{ matrix.github_cli_version  }}" 
75+             DOCKER_TAGS="${DOCKER_TAGS},docker.io/serversideup/github-cli:${{ steps.gh_version.outputs.version  }}" 
76+             DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${{ steps.gh_version.outputs.version  }}" 
7377            DOCKER_TAGS="${DOCKER_TAGS},docker.io/serversideup/github-cli:${{ inputs.release_type }}" 
7478            DOCKER_TAGS="${DOCKER_TAGS},ghcr.io/serversideup/github-cli:${{ inputs.release_type }}" 
7579          fi 
8993          cache-to : type=gha,mode=max 
9094          build-args : | 
9195            BUILD_BASE_OS_VERSION=${{ matrix.base_os }} 
92-             BUILD_GITHUB_CLI_VERSION=${{ matrix.github_cli_version  }} 
96+             BUILD_GITHUB_CLI_VERSION=${{ steps.gh_version.outputs.version  }} 
9397            REPOSITORY_BUILD_VERSION=${{ env.REPOSITORY_BUILD_VERSION }} 
9498platforms : | 
9599            linux/amd64 
0 commit comments