Commit 2f803b5 1 parent d572d4e commit 2f803b5 Copy full SHA for 2f803b5
File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ name: release
3
3
on :
4
4
push :
5
5
tags :
6
+ - ' agora/v*'
6
7
- ' openchallenges/v*'
7
8
8
9
env :
9
10
DOCKER_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
10
11
DOCKER_USERNAME : ${{ github.actor }}
12
+ PRODUCT : ' '
11
13
VERSION : ' '
12
14
13
15
jobs :
@@ -19,13 +21,15 @@ jobs:
19
21
with :
20
22
fetch-depth : 1
21
23
22
- - name : Extract version from Git tag
23
- id : extract_version
24
+ - name : Extract product and version from Git tag
24
25
run : |
25
- # Get the tag name and remove 'openchallenges/' prefix
26
- VERSION=${GITHUB_REF#refs/tags/openchallenges/v}
26
+ # Extract the product name (part before the first slash) and version (part after the first slash)
27
+ PRODUCT=$(echo "${GITHUB_REF#refs/tags/}" | cut -d'/' -f1)
28
+ VERSION=$(echo "${GITHUB_REF#refs/tags/}" | cut -d'/' -f2)
29
+
30
+ # Output extracted values for the rest of the job
31
+ echo "PRODUCT=${PRODUCT}" >> $GITHUB_ENV
27
32
echo "VERSION=${VERSION}" >> $GITHUB_ENV
28
- echo "Docker image tag will be: ${VERSION}"
29
33
30
34
- name : Derive appropriate SHAs for base and head for `nx affected` commands
31
35
uses : nrwl/nx-set-shas@v4
37
41
run : |
38
42
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
39
43
&& export VERSION=${{ env.VERSION }} \
40
- && nx build-image openchallenges -apex --configuration=ci"
44
+ && nx build-image ${{ env.PRODUCT }} -apex --configuration=ci"
You can’t perform that action at this time.
0 commit comments