mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-13 13:06:51 +00:00
Print Version Number on startup (#1659)
* Changed Dockerfile to get the Enviroment variable from the github actions workflow and pass it to the main.go file Added a function in main.go to fetch the enviroment varible and to have a fallback if the env variable isnt there Added a test for the version to use for this branch only * Update test-version.yaml * Update test-version.yaml * Removed the test because its not needed when we push upstream * Moved the version print in main.go to the Log codeblock as requested by toast-gear Added version as issue#1161 requests. Decided to use a docker tag structure for the userAgent string, with : being a seperator of the name and version * Used ldflags instead like mumoshu recommended Changed Dockerfile to use $VERSION from the workflow Added version.go and the build package Removed the getVersion function as we can just get the value directly * Used ldflags instead like mumoshu recommended Changed Dockerfile to use $VERSION from the workflow Added version.go and the build package Removed the getVersion function as we can just get the value directly * * Removed the default from the go code (set it as N/A) * Changed version from latest to dev inside makefile * Added buildarg for version to the dockerfile in the makerfile * Added VERSION with default dev value as arg inside dockerfile * Cleaned up inside dockerfile * Fix failing test * Fix possible missing VERSION in the ARC UA suffix due to missing build arg in docker-build-push step Co-authored-by: S8338C <viktor.lindgren@seb.se> Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
1
.github/workflows/publish-arc.yaml
vendored
1
.github/workflows/publish-arc.yaml
vendored
@@ -58,6 +58,7 @@ jobs:
|
||||
with:
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: VERSION=${{ env.VERSION }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:latest
|
||||
|
||||
1
.github/workflows/publish-canary.yaml
vendored
1
.github/workflows/publish-canary.yaml
vendored
@@ -50,6 +50,7 @@ jobs:
|
||||
with:
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: VERSION=canary
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:canary
|
||||
|
||||
Reference in New Issue
Block a user