Skip to content

Commit

Permalink
new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
agt committed Feb 18, 2024
1 parent 6d5e535 commit f3090ec
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 85 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/code-analysis.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/docker.chatgpt-lite.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build notebook
on:
push:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout notebook
uses: actions/checkout@v3

- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate tags and labels
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Check Free Space 0
run: |
echo "Free space:"
df -h
- name: Docker/ENV cleanup Cleanup
run: |
docker image prune -a -f
docker container prune -f
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Check Free Space 1
run: |
echo "Free space:"
df -h
- name: Build and push notebook
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit f3090ec

Please sign in to comment.