Skip to content

Commit

Permalink
fix: properly use a step to get the version number
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz committed Feb 11, 2025
1 parent ad76e44 commit baabb7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/reusable-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ env:
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
DEFAULT_TAG: "lts"
CENTOS_VERSION: ${{ inputs.centos-version }}
CENTOS_VERSION_NUMBER: ${{ inputs.centos-version | tr -d -c 0-9 }}
PLATFORMS: ${{ inputs.platforms }}

jobs:
Expand Down Expand Up @@ -264,6 +263,12 @@ jobs:
# https://linux.die.net/man/1/date
echo "date=$(date -u +%Y\-%m\-%d\T%H\:%M\:%S\Z)" >> $GITHUB_OUTPUT
- name: Extract numbers from input
id: extract-numbers
run: |
numbers_only=$(echo "${{ env.CENTOS_VERSION }}" | tr -cd '0-9')
echo "CENTOS_VERSION_NUMBER=$numbers_only" >> $GITHUB_ENV
- name: Image Metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
id: metadata
Expand Down

0 comments on commit baabb7d

Please sign in to comment.