Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed Mar 26, 2024
1 parent d484961 commit 6c6ebb3
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 49 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,49 +227,49 @@ jobs:
run: |
docker manifest inspect ${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }} > manifest.json
# - name: Reclaim Disk Space for SBOM Generation 🚮
# uses: insightsengineering/disk-space-reclaimer@v1
# with:
# tools-cache: false
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# swap-storage: false
# docker-images: true

# - name: Generate SBOM 📃
# uses: anchore/sbom-action@v0
# with:
# image: "${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}"
# output-file: "${{ steps.build_vars.outputs.SBOM_OUTPUT_FILENAME }}"
# artifact-name: "sbom.spdx"

# - name: Upload image manifest to release 🔼
# uses: svenstaro/upload-release-action@v2
# if: "${{ needs.normalize-inputs.outputs.release_tag }} != ''"
# with:
# repo_token: ${{ secrets.REPO_GITHUB_TOKEN }}
# file: "manifest.json"
# asset_name: "image.manifest.${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}.json"
# tag: "${{ needs.normalize-inputs.outputs.release_tag }}"
# overwrite: true

# - name: Upload SBOM to release 🔼
# uses: svenstaro/upload-release-action@v2
# if: "${{ needs.normalize-inputs.outputs.release_tag }} != ''"
# with:
# repo_token: ${{ secrets.REPO_GITHUB_TOKEN }}
# file: "${{ steps.build_vars.outputs.SBOM_OUTPUT_FILENAME }}"
# asset_name: "SBOM for ${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}.spdx.json"
# tag: "${{ needs.normalize-inputs.outputs.release_tag }}"
# overwrite: true

# - name: Move cache ♻️
# run: |
# rm -rf /tmp/.buildx-cache
# if [ -f /tmp/.buildx-cache-new ]
# then {
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache
# }
# fi
- name: Reclaim Disk Space for SBOM Generation 🚮
uses: insightsengineering/disk-space-reclaimer@v1
with:
tools-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
docker-images: true

- name: Generate SBOM 📃
uses: anchore/sbom-action@v0
with:
image: "${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}"
output-file: "${{ steps.build_vars.outputs.SBOM_OUTPUT_FILENAME }}"
artifact-name: "sbom.spdx"

- name: Upload image manifest to release 🔼
uses: svenstaro/upload-release-action@v2
if: "${{ needs.normalize-inputs.outputs.release_tag }} != ''"
with:
repo_token: ${{ secrets.REPO_GITHUB_TOKEN }}
file: "manifest.json"
asset_name: "image.manifest.${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}.json"
tag: "${{ needs.normalize-inputs.outputs.release_tag }}"
overwrite: true

- name: Upload SBOM to release 🔼
uses: svenstaro/upload-release-action@v2
if: "${{ needs.normalize-inputs.outputs.release_tag }} != ''"
with:
repo_token: ${{ secrets.REPO_GITHUB_TOKEN }}
file: "${{ steps.build_vars.outputs.SBOM_OUTPUT_FILENAME }}"
asset_name: "SBOM for ${{ steps.build_vars.outputs.OUTPUT_IMAGE_NAME }}.spdx.json"
tag: "${{ needs.normalize-inputs.outputs.release_tag }}"
overwrite: true

- name: Move cache ♻️
run: |
rm -rf /tmp/.buildx-cache
if [ -f /tmp/.buildx-cache-new ]
then {
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
}
fi
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY --chmod=0755 [\

RUN ./install_sysdeps.sh ${DESTINATION_IMAGE_NAME}

COPY --chmod=0755 init /init
COPY --chmod=0755 init-vscode /init-vscode
COPY config/vs-code-config.yaml /root/.config/code-server/config.yaml

WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion init → init-vscode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/bash

echo "Start Visual Studio Code server"
echo "Starting Visual Studio Code server"
code-server \
--bind-addr 0.0.0.0:8081 \
--auth none \
Expand Down
11 changes: 10 additions & 1 deletion scripts/install_sysdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ wget -q "${QUARTO_DL_URL}" -O quarto-"${ARCH}".deb
dpkg -i quarto-"${ARCH}".deb
quarto check install

if [ "$distribution" == "julia-vscode" ]; then
if [ "$destination_image_name" == "julia-vscode" ]; then
# Install VS Code server.
wget --no-check-certificate https://code-server.dev/install.sh -O - | sh
cp /init-vscode /init
fi

# Install security patches
Expand All @@ -55,3 +56,11 @@ rm -rf /var/lib/apt/lists/* quarto-"${ARCH}".deb

echo "LC_ALL=$LC_ALL" >> /etc/profile
echo "PATH=$PATH" >> /etc/profile

# Set default initializer if unavailable
if [ ! -f /init ]
then {
echo "sh" > /init
chmod +x /init
}
fi

0 comments on commit 6c6ebb3

Please sign in to comment.