Skip to content

Commit 2567ff1

Browse files
author
saul-data
committed
embed version into binary
1 parent 1c2c5d0 commit 2567ff1

4 files changed

Lines changed: 21 additions & 20 deletions

File tree

.github/workflows/main-runtests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949

5050
# Get values for cache paths to be used in later steps
5151
- id: go-cache-paths
52+
name: Github Actions Environment Variables
5253
run: |
5354
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_ENV"
5455
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_ENV"

.github/workflows/release-docker-mainapp.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
run: echo "DP_VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
2323

2424
# - name: Release check out ${{ steps.get_version.outputs.VERSION }}
25-
- name: Release check out $DP_VERSION
25+
- name: Release check out ${{ env.DP_VERSION }}
2626
uses: actions/checkout@v3
2727
with:
28-
ref: $DP_VERSION
28+
ref: ${{ env.DP_VERSION }}
2929
# ref: ${{ steps.get_version.outputs.VERSION }}
3030

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

46-
- name: Tag reference ${{ github.ref }} - version=$DP_VERSION
46+
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
4747
run: |
48-
echo release: $DP_VERSION
49-
export dpversion=$DP_VERSION
48+
echo release: ${{ env.DP_VERSION }}
49+
export dpversion=${{ env.DP_VERSION }}
5050
echo docker version: $dpversion
5151
5252
@@ -73,7 +73,7 @@ jobs:
7373
tags: ${{ steps.meta.outputs.tags }}
7474
labels: ${{ steps.meta.outputs.labels }}
7575
build-args: |
76-
DATAPLANE_VERSION=$DP_VERSION
76+
DATAPLANE_VERSION=${{ env.DP_VERSION }}
7777
7878
# Sign the resulting Docker image digest except on PRs.
7979
# This will only write to the public Rekor transparency log when the Docker

.github/workflows/release-docker-python-worker-ubuntu.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818

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

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

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

43-
- name: Tag reference ${{ github.ref }} - version=${{ steps.get_version.outputs.VERSION }}
43+
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
4444
run: |
45-
echo release: ${{ steps.get_version.outputs.VERSION }}
46-
export dpversion=${{ steps.get_version.outputs.VERSION }}
45+
echo release: ${{ env.DP_VERSION }}
46+
export dpversion=${{ env.DP_VERSION }}
4747
echo docker version: $dpversion
4848
4949
@@ -70,7 +70,7 @@ jobs:
7070
tags: ${{ steps.meta.outputs.tags }}
7171
labels: ${{ steps.meta.outputs.labels }}
7272
build-args: |
73-
DATAPLANE_VERSION=${{ steps.get_version.outputs.VERSION }}
73+
DATAPLANE_VERSION=${{ env.DP_VERSION }}
7474
7575
# Sign the resulting Docker image digest except on PRs.
7676
# This will only write to the public Rekor transparency log when the Docker

.github/workflows/release-docker-python-worker.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818

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

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

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

43-
- name: Tag reference ${{ github.ref }} - version=${{ steps.get_version.outputs.VERSION }}
43+
- name: Tag reference ${{ github.ref }} - version=${{ env.DP_VERSION }}
4444
run: |
45-
echo release: ${{ steps.get_version.outputs.VERSION }}
46-
export dpversion=${{ steps.get_version.outputs.VERSION }}
45+
echo release: ${{ env.DP_VERSION }}
46+
export dpversion=${{ env.DP_VERSION }}
4747
echo docker version: $dpversion
4848
4949
@@ -70,7 +70,7 @@ jobs:
7070
tags: ${{ steps.meta.outputs.tags }}
7171
labels: ${{ steps.meta.outputs.labels }}
7272
build-args: |
73-
DATAPLANE_VERSION=${{ steps.get_version.outputs.VERSION }}
73+
DATAPLANE_VERSION=${{ env.DP_VERSION }}
7474
7575
# Sign the resulting Docker image digest except on PRs.
7676
# This will only write to the public Rekor transparency log when the Docker

0 commit comments

Comments
 (0)