Update uploadFile.yml #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker image | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-with-docker: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Remove unnecessary files | |
run: | | |
sudo ls -l /usr/share/dotnet | |
sudo ls -l /var/lib/docker/tmp | |
sudo ls -l "$AGENT_TOOLSDIRECTORY" | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: free disk space | |
run: | | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt clean | |
docker rmi $(docker image ls -aq) | |
df -h |