Skip to content

Commit

Permalink
set VERSION environment variable
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Kolberg <[email protected]>
  • Loading branch information
amdprophet committed Nov 8, 2024
1 parent ce5d823 commit ac65ee7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ jobs:
runs-on: ${{ matrix.runs-on }}
fips: ${{ matrix.fips == true }}
save-cache: true
version: ${{ needs.get-version.outputs.version }}
secrets:
apple_developer_certificate_p12_base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
apple_developer_certificate_password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ jobs:
**/Makefile.common
**/Dockerfile*
get-version:
name: Get application version for this revision
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version
id: get-version
run: |
version=$(./ci/get_version.sh full | xargs)-$(git rev-parse HEAD | xargs)
echo "version=${version}" > $GITHUB_OUTPUT
- name: Print version
run: echo ::notice title=Version::${{ steps.get-version.outputs.version }}

markdownlint:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -249,6 +268,7 @@ jobs:
arch_os: ${{ matrix.arch_os }}
runs-on: ${{ matrix.runs-on }}
fips: ${{ matrix.fips == true }}
version: ${{ needs.get-version.outputs.version }}
secrets:
apple_developer_certificate_p12_base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
apple_developer_certificate_password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
description: Save the module and build caches.
default: false
type: boolean
version:
description: Version to use when building the binary
required: true
type: string
secrets:
apple_developer_certificate_p12_base64:
required: false
Expand All @@ -46,6 +50,7 @@ defaults:

env:
GO_VERSION: "1.22.6"
VERSION: ${{ inputs.version }}

jobs:
build:
Expand Down

0 comments on commit ac65ee7

Please sign in to comment.