Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Feb 14, 2024
2 parents d53f019 + 1a28b31 commit 9f75174
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ jobs:
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
steps:
- uses: actions/checkout@v4

- name: "Determine Version"
id: config_step
run: |-
VERSION_STR=$(cat VERSION)
echo "::notice::Version STR=${VERSION_STR}"
VER_BUILD=$(date +%H%M)
# limit to only first 3 chars
VER_BUILD=${VER_BUILD:0:3}
# 'strict' semver segments cannot start with 0
VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d).${VER_BUILD#0}"
# recreate as INT, leaving 0's in place; creates a 'reasonable' 32-bit signed int.
VERSION_INT="$(date +%y)$(date +%m)$(date +%d)${VER_BUILD}"
VERSION_STR=${VERSION_NUM}
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
echo "::notice::Version STR=${VERSION_STR}"
#endjob build_cfg

trigger-build:
Expand Down Expand Up @@ -51,7 +57,7 @@ jobs:
"dockerfile": "Dockerfile",
"arch_allowed": "amd64 arm64",
"name": "${{ github.repository }}",
"version": "${{ needs.build_cfg.outputs.VERSION_STR }}",
"tag": "${{ needs.build_cfg.outputs.VERSION_STR }}",
"build_args": [
]
},
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: "Create Version STR"
id: config_step
run: |-
VER_BUILD=$(date +%-H%M)
VERSION_STR="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}"
VER_BUILD=$(date +%H%M)
# limit to only first 3 chars
VER_BUILD=${VER_BUILD:0:3}
# 'strict' semver segments cannot start with 0
VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d).${VER_BUILD#0}"
# recreate as INT, leaving 0's in place; creates a 'reasonable' 32-bit signed int.
VERSION_INT="$(date +%y)$(date +%m)$(date +%d)${VER_BUILD}"
VERSION_STR=${VERSION_NUM}
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
echo "::notice::Version STR=${VERSION_STR}"
Expand All @@ -29,8 +35,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.config_step.outputs.VERSION_STR }}
release_name: ${{ steps.config_step.outputs.VERSION_STR }}
tag_name: v${{ steps.config_step.outputs.VERSION_STR }}
release_name: v${{ steps.config_step.outputs.VERSION_STR }}
generate_release_notes: true
target_commitish: ${{ github.ref_name }}
#endjob build_cfg
Expand Down Expand Up @@ -61,12 +67,12 @@ jobs:
"dockerfile": "Dockerfile",
"arch_allowed": "amd64 arm64",
"name": "${{ github.repository }}",
"version": "${{ needs.build_cfg.outputs.VERSION_STR }}",
"tag": "${{ needs.build_cfg.outputs.VERSION_STR }}",
"build_args": [
]
},
"deployment": {
"deploy_flag": "${{ github.ref_type == 'branch' }}",
"deploy_flag": "0",
"k8s_project": "${{ env.K8S_PROJECT }}",
"k8s_container": "${{ env.K8S_CONTAINER }}",
"deploy_msg": "${{ env.SLACK_DEPLOY_MSG }}"
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

0 comments on commit 9f75174

Please sign in to comment.