TGx-DDI by ensembl IDs - Tempo-seq and RNA-seq (#251) #94
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 and push a container to GHCR | |
on: | |
push: | |
branches: | |
- include_r_pkg | |
- main | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest # self-hosted # | |
steps: | |
# add a step to reduce disk space on the runner | |
- name: Reduce disk space | |
run: | | |
sudo apt-get clean | |
sudo rm -rf /var/lib/apt/lists/* | |
sudo rm -rf /var/cache/apt/* | |
sudo rm -rf /var/cache/debconf/* | |
sudo rm -rf /var/cache/fontconfig/* | |
sudo rm -rf /var/cache/gdm/* | |
df -h | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Disk space before build | |
run: df -h | |
- name: Build and push container image to GHCR | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
output: true | |
tags: ghcr.io/r-odaf/r-odaf_health_canada:r-pkg-test | |
file: ./Dockerfile | |
cache-from: type=registry,ref=ghcr.io/r-odaf/r-odaf_health_canada:cache | |
cache-to: type=inline | |
- name: Disk space after build | |
run: df -h | |
- name: Find large files and directories | |
run: | | |
du -ah . | sort -rh | head -n 20 |