Skip to content

Commit

Permalink
embed version into binary
Browse files Browse the repository at this point in the history
  • Loading branch information
saul-data committed Oct 9, 2023
1 parent 1c2c5d0 commit 2567ff1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main-runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:

# Get values for cache paths to be used in later steps
- id: go-cache-paths
name: Github Actions Environment Variables
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_ENV"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_ENV"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-docker-mainapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
run: echo "DP_VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"

# - name: Release check out ${{ steps.get_version.outputs.VERSION }}
- name: Release check out $DP_VERSION
- name: Release check out ${{ env.DP_VERSION }}
uses: actions/checkout@v3
with:
ref: $DP_VERSION
ref: ${{ env.DP_VERSION }}
# ref: ${{ steps.get_version.outputs.VERSION }}

# Login against a Docker registry except on PR
Expand All @@ -43,10 +43,10 @@ jobs:
# with:
# cosign-release: 'v1.9.0'

- name: Tag reference ${{ github.ref }} - version=$DP_VERSION
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
run: |
echo release: $DP_VERSION
export dpversion=$DP_VERSION
echo release: ${{ env.DP_VERSION }}
export dpversion=${{ env.DP_VERSION }}
echo docker version: $dpversion
Expand All @@ -73,7 +73,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DATAPLANE_VERSION=$DP_VERSION
DATAPLANE_VERSION=${{ env.DP_VERSION }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release-docker-python-worker-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "DP_VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"

- name: Release check out ${{ steps.get_version.outputs.VERSION }}
- name: Release check out ${{ env.DP_VERSION }}
uses: actions/checkout@v3
with:
ref: ${{ steps.get_version.outputs.VERSION }}
ref: ${{ env.DP_VERSION }}

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
Expand All @@ -40,10 +40,10 @@ jobs:
# with:
# cosign-release: 'v1.9.0'

- name: Tag reference ${{ github.ref }} - version=${{ steps.get_version.outputs.VERSION }}
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
run: |
echo release: ${{ steps.get_version.outputs.VERSION }}
export dpversion=${{ steps.get_version.outputs.VERSION }}
echo release: ${{ env.DP_VERSION }}
export dpversion=${{ env.DP_VERSION }}
echo docker version: $dpversion
Expand All @@ -70,7 +70,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DATAPLANE_VERSION=${{ steps.get_version.outputs.VERSION }}
DATAPLANE_VERSION=${{ env.DP_VERSION }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release-docker-python-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "DP_VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"

- name: Release check out ${{ steps.get_version.outputs.VERSION }}
- name: Release check out ${{ env.DP_VERSION }}
uses: actions/checkout@v3
with:
ref: ${{ steps.get_version.outputs.VERSION }}
ref: ${{ env.DP_VERSION }}

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
Expand All @@ -40,10 +40,10 @@ jobs:
# with:
# cosign-release: 'v1.9.0'

- name: Tag reference ${{ github.ref }} - version=${{ steps.get_version.outputs.VERSION }}
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
run: |
echo release: ${{ steps.get_version.outputs.VERSION }}
export dpversion=${{ steps.get_version.outputs.VERSION }}
echo release: ${{ env.DP_VERSION }}
export dpversion=${{ env.DP_VERSION }}
echo docker version: $dpversion
Expand All @@ -70,7 +70,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DATAPLANE_VERSION=${{ steps.get_version.outputs.VERSION }}
DATAPLANE_VERSION=${{ env.DP_VERSION }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down

0 comments on commit 2567ff1

Please sign in to comment.