File tree Expand file tree Collapse file tree 3 files changed +27
-101
lines changed Expand file tree Collapse file tree 3 files changed +27
-101
lines changed Original file line number Diff line number Diff line change 46
46
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
47
47
fi
48
48
49
+ - name : Update config.json version
50
+ run : chmod +x update_version.sh && ./update_version.sh ${{ env.tag }}
51
+
49
52
- name : Extract metadata (tags, labels) for Docker
50
53
id : meta
51
54
uses : docker/metadata-action@v4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if an argument is provided
4
+ if [ -z " $1 " ]; then
5
+ echo " No argument provided. Usage: ./update_version.sh <argument>"
6
+ exit 1
7
+ fi
8
+
9
+ # Check if the input is "latest"
10
+ if [ " $1 " == " latest" ]; then
11
+ echo " Input is 'latest'. No changes made."
12
+ exit 0
13
+ fi
14
+
15
+ # Check if config.json exists
16
+ if [ ! -f " config.json" ]; then
17
+ echo " File config.json does not exist."
18
+ exit 1
19
+ fi
20
+
21
+ # Replace "latest" with the provided argument in config.json
22
+ sed -i " s/latest/$1 /g" config.json
23
+
24
+ echo " Replaced all occurrences of 'latest' with '$1 ' in config.json."
You can’t perform that action at this time.
0 commit comments