Skip to content

PUBLISH to GitHub Container Registry #2

PUBLISH to GitHub Container Registry

PUBLISH to GitHub Container Registry #2

Workflow file for this run

name: Build and Push Docker Containers to GitHub Container Registry
on: [pull_request]
env:
IMAGE_NAME: quantecon-lecture-python
TAG: cuda-12.3.1-anaconda-2024-02-py311
jobs:
push_to_registry:
name: Push Docker image to GitHub Containers
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
# - name: Create more disk space on Ubuntu
# run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Build image
run: |
cd cuda-12.3.1-anaconda-2024-02-py311
docker build . --file Dockerfile --tag $IMAGE_NAME --label $TAG
- name: Log in to registr y
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push Container
run: |
docker tag $IMAGE_NAME $IMAGE_ID:$TAG
docker push $IMAGE_ID:$TAG