File tree 8 files changed +16
-74
lines changed
8 files changed +16
-74
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ check_image_size() {
36
36
# call install_bc
37
37
install_bc
38
38
39
- CONTAINER_ID=$( docker ps -q --filter " label=test-container=$IMAGE " )
40
- # Find the image ID of the container
41
- IMAGE_ID=$( docker inspect --format=' {{.Image}}' " $CONTAINER_ID " )
39
+ if [ $IMAGE == " universal" ]; then
40
+ # Read the image id of the original image, not the modified image with uid and gid
41
+ IMAGE_ID=$( docker images | grep -v " uid" | sed ' 1d' | awk ' {print $3}' )
42
+ else
43
+ CONTAINER_ID=$( docker ps -q --filter " label=test-container=$IMAGE " )
44
+ # Find the image ID of the container
45
+ IMAGE_ID=$( docker inspect --format=' {{.Image}}' " $CONTAINER_ID " )
46
+ fi
42
47
# Find the size of the image
43
48
IMAGE_SIZE=$( docker image inspect --format=' {{.Size}}' " $IMAGE_ID " )
44
49
# Output the size
Original file line number Diff line number Diff line change 41
41
path : ' release'
42
42
ref : ${{ github.event.inputs.release }}
43
43
44
- - name : Get userUid from host machine
45
- id : get-useruid
46
- run : |
47
- set -e
48
- USER_UID=$(id -u)
49
- USER_GID=$(id -g)
50
- echo "UserUid::$USER_UID"
51
- echo "UserGid::$USER_GID"
52
- echo "USER_UID=$USER_UID" >> $GITHUB_ENV
53
- echo "USER_GID=$USER_GID" >> $GITHUB_ENV
54
-
55
44
- name : Build and push
56
45
id : build_and_push
57
46
env :
62
51
SECONDARY_REGISTRY_BASE_PATH : ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
63
52
TOKEN_NAME : ${{ secrets.TOKEN_NAME }}
64
53
PASSWORD : ${{ secrets.PASSWORD }}
65
- USER_UID : ${{ env.USER_UID }}
66
- USER_GID : ${{ env.USER_GID }}
67
54
run : |
68
55
set -e
69
56
Original file line number Diff line number Diff line change 29
29
- name : Checkout
30
30
id : checkout
31
31
uses : actions/checkout@v3
32
-
33
- - name : Get userUid from host machine
34
- id : get-useruid
35
- run : |
36
- set -e
37
- USER_UID=$(id -u)
38
- USER_GID=$(id -g)
39
- echo "UserUid::$USER_UID"
40
- echo "UserGid::$USER_GID"
41
- echo "USER_UID=$USER_UID" >> $GITHUB_ENV
42
- echo "USER_GID=$USER_GID" >> $GITHUB_ENV
32
+
43
33
44
34
- name : Build and push dev tags
45
35
id : build_and_push
51
41
STUB_REGISTRY_BASE_PATH : ${{ secrets.STUB_REGISTRY_BASE_PATH }}
52
42
SECONDARY_REGISTRY_BASE_PATH : ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
53
43
TOKEN_NAME : ${{ secrets.TOKEN_NAME }}
54
- PASSWORD : ${{ secrets.PASSWORD }}
55
- USER_UID : ${{ env.USER_UID }}
56
- USER_GID : ${{ env.USER_GID }}
44
+ PASSWORD : ${{ secrets.PASSWORD }}
57
45
run : |
58
46
set -e
59
47
Original file line number Diff line number Diff line change 36
36
with :
37
37
path : ' release'
38
38
ref : ${{ github.event.inputs.release }}
39
-
40
- - name : Get userUid from host machine
41
- id : get-useruid
42
- run : |
43
- set -e
44
- USER_UID=$(id -u)
45
- USER_GID=$(id -g)
46
- echo "UserUid::$USER_UID"
47
- echo "UserGid::$USER_GID"
48
- echo "USER_UID=$USER_UID" >> $GITHUB_ENV
49
- echo "USER_GID=$USER_GID" >> $GITHUB_ENV
50
39
51
40
- name : Build and push
52
41
id : build_and_push
58
47
SECONDARY_REGISTRY_BASE_PATH : ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
59
48
TOKEN_NAME : ${{ secrets.TOKEN_NAME }}
60
49
PASSWORD : ${{ secrets.PASSWORD }}
61
- USER_UID : ${{ env.USER_UID }}
62
- USER_GID : ${{ env.USER_GID }}
63
50
run : |
64
51
set -e
65
52
Original file line number Diff line number Diff line change 28
28
29
29
- name : Checkout
30
30
id : checkout
31
- uses : actions/checkout@v3
32
-
33
- - name : Get userUid from host machine
34
- id : get-useruid
35
- run : |
36
- set -e
37
- USER_UID=$(id -u)
38
- USER_GID=$(id -g)
39
- echo "UserUid::$USER_UID"
40
- echo "UserGid::$USER_GID"
41
- echo "USER_UID=$USER_UID" >> $GITHUB_ENV
42
- echo "USER_GID=$USER_GID" >> $GITHUB_ENV
31
+ uses : actions/checkout@v3
43
32
44
33
- name : Get tag name
45
34
run : echo "TAG=$(echo "${{ github.ref }}" | grep -oP 'refs/tags/\K(.+)')" >> $GITHUB_ENV
55
44
SECONDARY_REGISTRY_BASE_PATH : ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
56
45
TOKEN_NAME : ${{ secrets.TOKEN_NAME }}
57
46
PASSWORD : ${{ secrets.PASSWORD }}
58
- USER_UID : ${{ env.USER_UID }}
59
- USER_GID : ${{ env.USER_GID }}
60
47
run : |
61
48
set -e
62
49
Original file line number Diff line number Diff line change @@ -19,23 +19,10 @@ jobs:
19
19
- name : Checkout
20
20
id : checkout
21
21
uses : actions/checkout@v3
22
-
23
- - name : Get userUid from host machine
24
- id : get-useruid
25
- run : |
26
- set -e
27
- USER_UID=$(id -u)
28
- USER_GID=$(id -g)
29
- echo "UserUid::$USER_UID"
30
- echo "UserGid::$USER_GID"
31
- echo "USER_UID=$USER_UID" >> $GITHUB_ENV
32
- echo "USER_GID=$USER_GID" >> $GITHUB_ENV
33
22
34
23
- name : Smoke test
35
24
env :
36
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
- USER_UID : ${{ env.USER_UID }}
38
- USER_GID : ${{ env.USER_GID }}
25
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
26
id : smoke_test
40
27
uses : ./.github/actions/smoke-test
41
28
with :
Original file line number Diff line number Diff line change 6
6
"features" : {
7
7
"ghcr.io/devcontainers/features/common-utils:2" : {
8
8
"username" : " codespace" ,
9
- // Getting the UID & GID values of the host machine via GitHub actions
10
- "userUid" : " ${localEnv:USER_UID}" ,
11
- "userGid" : " ${localEnv:USER_GID}"
9
+ "userUid" : " 1000" ,
10
+ "userGid" : " 1000"
12
11
},
13
12
"ghcr.io/devcontainers/features/dotnet:2" : {
14
13
"version" : " 8.0" ,
Original file line number Diff line number Diff line change 2
2
cd $( dirname " $0 " )
3
3
4
4
source test-utils.sh codespace
5
+ # Changing he ownership of dotnet path to ensure oryx-install-dotnet-2.1 test doesn't fail with permission issue
6
+ sudo chown -R codespace:codespace /usr/share/dotnet
5
7
6
8
# Run common tests
7
9
checkCommon
You can’t perform that action at this time.
0 commit comments