mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-11-13 17:11:08 -05:00
ci: remove dependency on pseudo-version tool
This commit is contained in:
parent
055fb32918
commit
ed4d4d83fd
1 changed files with 5 additions and 21 deletions
26
.github/actions/pseudo_version/action.yml
vendored
26
.github/actions/pseudo_version/action.yml
vendored
|
|
@ -2,39 +2,23 @@ name: Determine pseudo version
|
||||||
description: "Determine go-like pseudo version to use as container image tag."
|
description: "Determine go-like pseudo version to use as container image tag."
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
semanticVersion:
|
|
||||||
description: "Semantic version based on the current HEAD"
|
|
||||||
value: ${{ steps.pseudo-version.outputs.semanticVersion }}
|
|
||||||
version:
|
version:
|
||||||
description: "Version based on branch name"
|
description: "Version based on branch name"
|
||||||
value: ${{ steps.pseudo-version.outputs.version }}
|
value: ${{ steps.pseudo-version.outputs.version }}
|
||||||
timestamp:
|
|
||||||
description: "Commit timestamp based on the current HEAD"
|
|
||||||
value: ${{ steps.pseudo-version.outputs.timestamp }}
|
|
||||||
branchName:
|
branchName:
|
||||||
description: "Branch name"
|
description: "Branch name"
|
||||||
value: ${{ steps.pseudo-version.outputs.branchName }}
|
value: ${{ steps.pseudo-version.outputs.branchName }}
|
||||||
|
|
||||||
# Linux runner only (homedir trick does not work on macOS, required for private runner)
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: get version
|
- name: get version
|
||||||
id: pseudo-version
|
id: pseudo-version
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: hack/pseudo-version
|
env:
|
||||||
|
WORKSPACE_STATUS_TOOL: ${{ github.workspace }}/tools/workspace_status.sh
|
||||||
run: |
|
run: |
|
||||||
homedir="$(getent passwd $(id -u) | cut -d ":" -f 6)"
|
version=$(${WORKSPACE_STATUS_TOOL} | grep STABLE_STAMP_VERSION | cut -d ' ' -f2)
|
||||||
export GOCACHE=${homedir}/.cache/go-build
|
branchName=$(git branch --show-current | tr '/' '-')
|
||||||
export GOPATH=${homedir}/go
|
echo "version=v${version}" | tee -a "$GITHUB_OUTPUT"
|
||||||
export GOMODCACHE=${homedir}/.cache/go-mod
|
|
||||||
|
|
||||||
version=$(go run .)
|
|
||||||
semanticVersion=$(go run . -semantic-version)
|
|
||||||
timestamp=$(go run . -print-timestamp)
|
|
||||||
branchName=$(go run . -print-branch)
|
|
||||||
|
|
||||||
echo "version=${version}" | tee -a "$GITHUB_OUTPUT"
|
|
||||||
echo "semanticVersion=${semanticVersion}" | tee -a "$GITHUB_OUTPUT"
|
|
||||||
echo "timestamp=${timestamp}" | tee -a "$GITHUB_OUTPUT"
|
|
||||||
echo "branchName=${branchName}" | tee -a "$GITHUB_OUTPUT"
|
echo "branchName=${branchName}" | tee -a "$GITHUB_OUTPUT"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue