Docker build update #2
This commit is contained in:
24
.github/workflows/docker-image.yml
vendored
24
.github/workflows/docker-image.yml
vendored
@@ -67,5 +67,25 @@ jobs:
|
||||
curl -d "Docker image build and push completed successfully for tag: ${{ env.IMAGE_TAG }}" \
|
||||
https://ntfy.karmaashomepage.online/ssh-project-build
|
||||
|
||||
- name: Cleanup Docker Images
|
||||
run: docker image prune -af
|
||||
- name: Cleanup Docker Images on GHCR
|
||||
run: |
|
||||
# Get the list of images from ghcr.io
|
||||
images=$(curl -s -H "Authorization: Bearer ${{ secrets.GHCR_TOKEN }}" \
|
||||
"https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/ssh-project/versions")
|
||||
|
||||
# List image tags and delete older versions (keep the latest 10)
|
||||
count=0
|
||||
max_images=10
|
||||
for image in $(echo "$images" | jq -r '.[].id'); do
|
||||
if [ $count -ge $max_images ]; then
|
||||
echo "Deleting image $image"
|
||||
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GHCR_TOKEN }}" \
|
||||
"https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/ssh-project/versions/$image"
|
||||
fi
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
- name: Cleanup Docker Images Locally
|
||||
run: |
|
||||
docker image prune -af
|
||||
docker system prune -af --volumes
|
||||
20
.idea/workspace.xml
generated
20
.idea/workspace.xml
generated
@@ -4,12 +4,9 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="8497df64-d86b-4c98-ac58-c157d9d3fb1e" name="Changes" comment="Silent resize cmds & Auto resize terminal #2">
|
||||
<list default="true" id="8497df64-d86b-4c98-ac58-c157d9d3fb1e" name="Changes" comment="Docker build update">
|
||||
<change beforePath="$PROJECT_DIR$/.github/workflows/docker-image.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.github/workflows/docker-image.yml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/backend/server.js" beforeDir="false" afterPath="$PROJECT_DIR$/backend/server.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/frontend/src/App.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/src/App.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/info.txt" beforeDir="false" afterPath="$PROJECT_DIR$/info.txt" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -118,7 +115,7 @@
|
||||
<updated>1733439468142</updated>
|
||||
<workItem from="1733439479708" duration="5489000" />
|
||||
<workItem from="1733448523969" duration="3535000" />
|
||||
<workItem from="1733549186397" duration="5748000" />
|
||||
<workItem from="1733549186397" duration="6074000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Nano zoom fix #11">
|
||||
<option name="closed" value="true" />
|
||||
@@ -224,7 +221,15 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1733553902375</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="14" />
|
||||
<task id="LOCAL-00014" summary="Docker build update">
|
||||
<option name="closed" value="true" />
|
||||
<created>1733555933987</created>
|
||||
<option name="number" value="00014" />
|
||||
<option name="presentableId" value="LOCAL-00014" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1733555933987</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="15" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@@ -263,6 +268,7 @@
|
||||
<MESSAGE value="Test ntfy build notification system" />
|
||||
<MESSAGE value="Silent resize cmds & Auto resize terminal #1" />
|
||||
<MESSAGE value="Silent resize cmds & Auto resize terminal #2" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Silent resize cmds & Auto resize terminal #2" />
|
||||
<MESSAGE value="Docker build update" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Docker build update" />
|
||||
</component>
|
||||
</project>
|
||||
Reference in New Issue
Block a user