Skip to content

Commit acc574e

Browse files
committed
fix
1 parent 2fa965d commit acc574e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/static.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ jobs:
122122
with:
123123
username: ${{ secrets.REGISTRY_USERNAME }}
124124
password: ${{ secrets.REGISTRY_PASSWORD }}
125+
- name: Set VERSION
126+
run: |
127+
if [ "${GITHUB_REF_TYPE}" == "tag" ]; then
128+
export VERSION=${GITHUB_REF_NAME:1}
129+
elif [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
130+
export VERSION="${REF}"
131+
else
132+
export VERSION=${GITHUB_SHA}
133+
fi
134+
135+
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
136+
env:
137+
REF: ${{ needs.prepare.outputs.ref }}
125138
- name: Build
126139
id: build
127140
uses: docker/bake-action@v6
@@ -142,7 +155,6 @@ jobs:
142155
${{ (fromJson(needs.prepare.outputs.push) && !matrix.debug && !matrix.mimalloc) && format('*.output=type=image,name={0},push-by-digest=true,name-canonical=true,push=true', env.IMAGE_NAME) || '' }}
143156
env:
144157
SHA: ${{ github.sha }}
145-
VERSION: ${{ (github.ref_type == 'tag' && github.ref_name) || needs.prepare.outputs.ref || 'dev' }}
146158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147159
- # Workaround for https://github.com/actions/runner/pull/2477#issuecomment-1501003600
148160
name: Export metadata

0 commit comments

Comments
 (0)