File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 IMAGE_DESC : " ${{ github.event.repository.name }}"
1717 IMAGE_NAME : " ${{ github.event.repository.name }}" # output image name, usually same as repo name
1818 IMAGE_REGISTRY : " ghcr.io/${{ github.repository_owner }}" # do not edit
19- IMAGE_VERSION : " sha-${{ github.sha }}"
2019 DEFAULT_TAG : " latest"
2120
2221concurrency :
5251 else
5352 echo "IMAGE_NAME=${IMAGE_NAME,,}-${{ matrix.variant }}" >> ${GITHUB_ENV}
5453 fi
54+ # Set IMAGE_VERSION as date.short-sha
55+ echo "IMAGE_VERSION=$(date +%Y%m%d).${GITHUB_SHA::7}" >> ${GITHUB_ENV}
5556
5657 - name : Checkout
5758 uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v5
59+ with :
60+ ref : ${{ github.event_name == 'schedule' && 'latest' || github.ref }}
5861
5962 - name : Get ISO 8601 timestamp for OCI image labels
6063 id : iso8601
@@ -143,7 +146,7 @@ jobs:
143146 with :
144147 ref : localhost/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
145148 version : ${{ env.IMAGE_VERSION }}
146- revision : ${{ github.sha }}
149+ revision : ${{ env.IMAGE_VERSION }}
147150
148151 - name : Login to GitHub Container Registry
149152 uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
You can’t perform that action at this time.
0 commit comments