53 это Санкт Петербург
All checks were successful
Deploy Production / Deploy to Staging (push) Has been skipped
All checks were successful
Deploy Production / Deploy to Staging (push) Has been skipped
This commit is contained in:
@@ -34,7 +34,6 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Extract Git metadata
|
||||
if: ${{ inputs.version == 'new' }}
|
||||
id: git-metadata
|
||||
run: |
|
||||
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
@@ -88,6 +87,9 @@ jobs:
|
||||
|
||||
VERSION: ${{ inputs.version == 'new' && 'latest' || inputs.version }}
|
||||
|
||||
APP_COMMIT: ${{ steps.git-metadata.outputs.GIT_TAG != 'none' && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
|
||||
APP_BUILD_DATE: ${{ date +"%Y-%m-%d %T %Z" }}
|
||||
|
||||
KEYCLOAK_BASE_URL: ${{ secrets.KEYCLOAK_BASE_URL }}
|
||||
KEYCLOAK_REALM: ${{ secrets.KEYCLOAK_REALM }}
|
||||
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_CLIENT_ID }}
|
||||
|
14
cmd/main.go
14
cmd/main.go
@@ -25,6 +25,20 @@ var (
|
||||
date string
|
||||
)
|
||||
|
||||
func init() {
|
||||
if version = os.Getenv("APP_VERSION"); version == "" {
|
||||
version = "undefined"
|
||||
}
|
||||
|
||||
if commit = os.Getenv("APP_COMMIT"); commit == "" {
|
||||
commit = "undefined"
|
||||
}
|
||||
|
||||
if date = os.Getenv("APP_BUILD_DATE"); date == "" {
|
||||
date = "undefined"
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
cfg := config.MustLoad(version, commit, date)
|
||||
|
||||
|
@@ -8,6 +8,10 @@ services:
|
||||
published: 8001
|
||||
protocol: tcp
|
||||
environment:
|
||||
APP_VERSION: ${VERSION:-latest}
|
||||
APP_COMMIT: ${APP_COMMIT:-undefined}
|
||||
APP_BUILD_DATE: ${APP_BUILD_DATE:-undefined}
|
||||
|
||||
KEYCLOAK_BASE_URL: ${KEYCLOAK_BASE_URL}
|
||||
KEYCLOAK_REALM: ${KEYCLOAK_REALM}
|
||||
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
|
||||
|
Reference in New Issue
Block a user