Compare commits
7 Commits
28833a7ec6
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| f1e192c5d4 | |||
| 3037381084 | |||
| e54c1d4848 | |||
| 3ae3f98df5 | |||
| 65d6514603 | |||
| bc44bcbde9 | |||
| cae0f2222a |
@@ -19,7 +19,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|
||||||
@@ -41,7 +40,7 @@ jobs:
|
|||||||
password: ${{ secrets.TOKEN }}
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
- name: Compute short SHA
|
- name: Compute short SHA
|
||||||
run: echo "SHORT_SHA=${GITEA_SHA::7}" >> $GITEA_ENV
|
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITEA_ENV
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "catalyst",
|
"name": "catalyst",
|
||||||
"version": "1.1.2",
|
"version": "1.2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node server/server.js",
|
"start": "node server/server.js",
|
||||||
|
|||||||
@@ -156,4 +156,11 @@ describe('CI workflow regressions', () => {
|
|||||||
// BUILD_VERSION was never passed to docker build.
|
// BUILD_VERSION was never passed to docker build.
|
||||||
expect(ciYml).toContain('BUILD_VERSION')
|
expect(ciYml).toContain('BUILD_VERSION')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('short SHA is computed with git rev-parse, not $GITEA_SHA (which is empty)', () => {
|
||||||
|
// Regression: ${GITEA_SHA::7} expands to "" on Gitea runners — nav showed "dev-".
|
||||||
|
// git rev-parse --short HEAD works regardless of which env vars the runner sets.
|
||||||
|
expect(ciYml).toContain('git rev-parse --short HEAD')
|
||||||
|
expect(ciYml).not.toContain('GITEA_SHA')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user