Skip to content

Commit db62afe

Browse files
committed
Try different version strategy
1 parent e6aa3dd commit db62afe

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

.github/workflows/deploy-dev.yaml

+5-11
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
# Deploys on version tag beginning v. Note there's a branch filter
99
# below, locks to the dev branch
10-
tags:
11-
- v*
10+
branches:
11+
dev
1212

1313
permissions:
1414
contents: read
@@ -19,12 +19,6 @@ jobs:
1919

2020
deploy:
2121

22-
# This doesn't work on tag pushes, so at the moment, all tags deploy
23-
# to dev
24-
25-
# Only fires on the dev branch
26-
# if: github.ref == 'refs/heads/dev'
27-
2822
name: Deploy to dev
2923
runs-on: ubuntu-latest
3024

@@ -35,14 +29,14 @@ jobs:
3529

3630
- name: Get version
3731
id: version
38-
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
32+
run: echo VERSION=sha-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
3933

4034
- name: Install deps
4135
run: npm install
4236

37+
#
4338
- name: Build container
44-
run: make VERSION=${{ steps.version.outputs.VERSION }}
45-
39+
run: make PACKAGE_VERSION=0.0.0 VERSION=${{ steps.version.outputs.VERSION }}
4640
- id: auth
4741
name: Authenticate with Google Cloud
4842
uses: google-github-actions/auth@v2

Makefile

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11

2-
VERSION=0.4.9
2+
PACKAGE_VERSION=0.0.0
3+
VERSION=0.0.0
34

45
all: service-package container
56

6-
version:
7-
@echo VERSION=${VERSION}
8-
97
ui:
108
npm run build
119
rm -rf config-ui/config_ui/ui/
@@ -27,7 +25,7 @@ service-package: ui template-data resources-data update-package-versions
2725
cd config-ui && python3 setup.py sdist --dist-dir ../pkgs/
2826

2927
update-package-versions:
30-
echo __version__ = \"${VERSION}\" > config-ui/config_ui/version.py
28+
echo __version__ = \"${PACKAGE_VERSION}\" > config-ui/config_ui/version.py
3129

3230
CONTAINER=localhost/config-ui
3331
DOCKER=podman

0 commit comments

Comments
 (0)