File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 9
9
env :
10
10
S3_BUCKET : openhpc-images-prerelease
11
11
IMAGE_PATH : environments/.stackhpc/tofu/cluster_image.auto.tfvars.json
12
+ RUNNER_IMAGE_DIR : /mnt/images
12
13
13
14
permissions :
14
15
contents : read
@@ -93,33 +94,26 @@ jobs:
93
94
echo "TARGET_IMAGE=${TARGET_IMAGE}" >> "$GITHUB_ENV"
94
95
shell : bash
95
96
96
- - name : Clear up some space on runner
97
- run : |
98
- df -h
99
- sudo rm -rf /usr/share/dotnet
100
- sudo rm -rf /opt/ghc
101
- sudo rm -rf "/usr/local/share/boost"
102
- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
103
- sudo apt-get clean
104
- df -h
105
-
106
97
- name : Download image to runner
107
98
run : |
108
99
. venv/bin/activate
109
- openstack image save --file "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
100
+ df -h
101
+ sudo mkdir ${{ env.RUNNER_IMAGE_DIR }}
102
+ sudo chmod ugo=rwX ${{ env.RUNNER_IMAGE_DIR }}
103
+ openstack image save --file "${{ env.RUNNER_IMAGE_DIR }}/${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
110
104
df -h
111
105
shell : bash
112
106
113
107
- name : Convert image to QCOW2
114
108
run : |
115
109
. venv/bin/activate
116
- qemu-img convert -f raw -O qcow2 -c "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
110
+ qemu-img convert -f raw -O qcow2 -c "${{ env.RUNNER_IMAGE_DIR }}/${{ env. TARGET_IMAGE }}.raw" "${{ env.RUNNER_IMAGE_DIR }}/ ${{ env.TARGET_IMAGE }}"
117
111
shell : bash
118
112
119
113
- name : Upload Image to S3
120
114
run : |
121
115
echo "Uploading Image: ${{ env.TARGET_IMAGE }} to S3..."
122
- s3cmd --multipart-chunk-size-mb=150 put ${{ env.TARGET_IMAGE }} s3://${{ env.S3_BUCKET }}
116
+ s3cmd --multipart-chunk-size-mb=150 put " ${{ env.RUNNER_IMAGE_DIR }}/${{ env. TARGET_IMAGE }}" s3://${{ env.S3_BUCKET }}
123
117
shell : bash
124
118
125
119
image_sync :
You can’t perform that action at this time.
0 commit comments