Skip to content

Merge pull request #23 from lasp/feature/remove-scan-action #31

Merge pull request #23 from lasp/feature/remove-scan-action

Merge pull request #23 from lasp/feature/remove-scan-action #31

Workflow file for this run

name: Publish
on:
push:
branches:
- develop
tags:
- v*
env:
REGISTRY: ghcr.io
BSK_VERSION: "v2.2.1"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Basilisk
uses: actions/checkout@v4
with:
repository: AVSLab/basilisk
ref: ${{ env.BSK_VERSION }}
lfs: true
path: basilisk
- name: Check disk space
run: |
sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | head
df . -h
sudo du /usr/ -hx -d 4 --threshold=1G | sort -hr | head
- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
- name: Check disk space
run: |
sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | head
df . -h
sudo du /usr/ -hx -d 4 --threshold=1G | sort -hr | head
- name: Login to the Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Build, scan, and push basilisk-jupyterlabs Docker artifacts.
- name: Extract metadata (tags, labels) for basilisk-jupyterlabs Docker image
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/lasp/basilisk-jupyterlabs
tags: type=raw, value=${{ env.BSK_VERSION }}
- name: Build basilisk-jupyterlabs Docker image
uses: docker/build-push-action@v5
with:
context: .
file: basilisk-jupyterlabs.Containerfile
load: true
tags: ${{ env.REGISTRY }}/lasp/basilisk-jupyterlabs:${{ github.sha }}
- name: Push basilisk-jupyterlabs Docker image
uses: docker/build-push-action@v5
with:
context: .
file: basilisk-jupyterlabs.Containerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}