diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 2f44be4..ee51cfe 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -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: @@ -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": [ ] }, diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 6cfb155..c19639d 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -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}" @@ -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 @@ -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 }}" diff --git a/VERSION b/VERSION deleted file mode 100644 index 73a6103..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.16.7