mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 04:35:41 -04:00
ci: update deployment workflow to add single and double digit version numbers
This commit is contained in:
32
.github/workflows/deploy-docker-github.yml
vendored
32
.github/workflows/deploy-docker-github.yml
vendored
@@ -243,6 +243,8 @@ jobs:
|
||||
- name: '🕛 Get Timestamp'
|
||||
id: task_release_set_timestamp
|
||||
run: |
|
||||
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
|
||||
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
|
||||
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
|
||||
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
|
||||
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
@@ -336,15 +338,21 @@ jobs:
|
||||
# latest yes
|
||||
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
|
||||
|
||||
# tag add tag
|
||||
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
|
||||
|
||||
# dispatch add x1.x.x
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=300,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
|
||||
|
||||
# dispatch add x1.x
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
|
||||
|
||||
# dispatch add x1
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
|
||||
|
||||
# dispatch add development
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=,value=development
|
||||
|
||||
# tag add tag
|
||||
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
|
||||
|
||||
# add development tag to default architecture (amd64)
|
||||
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
|
||||
flavor: |
|
||||
@@ -444,6 +452,8 @@ jobs:
|
||||
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
|
||||
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
|
||||
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
|
||||
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
|
||||
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
|
||||
echo "env.IMAGE_GHCR_AUTHOR .................... ${{ env.IMAGE_GHCR_AUTHOR }}"
|
||||
echo "env.IMAGE_GHCR_USERNAME .................. ${{ env.IMAGE_GHCR_USERNAME }}"
|
||||
echo "env.NOW .................................. ${{ env.NOW }}"
|
||||
@@ -471,6 +481,20 @@ jobs:
|
||||
echo "docker image id (arm64) .................. ${{ steps.task_release_gh_push_arm64.outputs.imageid }}"
|
||||
echo "docker digest (arm64) .................... ${{ steps.task_release_gh_push_arm64.outputs.digest }}"
|
||||
|
||||
# #
|
||||
# Release › Github › Clean Untagged Images
|
||||
# #
|
||||
|
||||
- name: '🧹 Clean Untagged Images'
|
||||
uses: quartx-analytics/ghcr-cleaner@v1
|
||||
with:
|
||||
owner-type: org
|
||||
token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
|
||||
repository-owner: ${{ github.repository_owner }}
|
||||
repository-name: ${{ github.repository }}
|
||||
delete-untagged: true
|
||||
# keep-at-most: 0
|
||||
|
||||
# #
|
||||
# Release › Github › Get Weekly Commits
|
||||
# #
|
||||
|
||||
Reference in New Issue
Block a user