Skip to content

Commit 077cb81

Browse files
committed
Change source of truth to txt file
1 parent 79c63d7 commit 077cb81

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/service_docker-build-and-publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
2630
- name: 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
@@ -89,7 +93,7 @@ jobs:
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 }}
9498
platforms: |
9599
linux/amd64

github-cli-build-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.60.1
1+
2.60.0

0 commit comments

Comments
 (0)