tag-image-mpa2065 #8
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: tag-image-mpa2065 | |
on: [workflow_dispatch] | |
env: | |
CLASS: mpa2065 | |
TARGET: r_julia | |
SQLITE: false | |
PYTHON_VERSION: "3.9.17" | |
PROJECT_ID: jupyterhub-docker-images | |
REGION: us-east1 | |
GAR_LOCATION: us-east1-docker.pkg.dev/jupyterhub-docker-images/all-classes/mpa2065 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set Up GCloud | |
uses: google-github-actions/[email protected] | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID_JH_DOCKER }} | |
service_account_key: ${{ secrets.GCP_SA_KEY_JH_DOCKER }} | |
export_default_credentials: true | |
- name: Create Julia Environment Files | |
if: env.TARGET == 'r_julia' | |
run: | | |
sudo --preserve-env=CLASS docker compose up julia_build | |
- name: Upload Julia Env Files to Google Storage Bucket | |
if: env.TARGET == 'r_julia' | |
run: | | |
gsutil cp -r requirements/classes/mpa2065/julia_env gs://jupyterhub-environment-files/fall-2024/mpa2065/past/${GITHUB_SHA}/julia | |
gsutil cp -r requirements/classes/mpa2065/julia_env gs://jupyterhub-environment-files/fall-2024/mpa2065/latest/julia | |
- name: Configure Docker | |
run: gcloud auth configure-docker | |
- name: Build JH Image | |
run: | | |
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up jh_image | |
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:${GITHUB_REF##*/} | |
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:${GITHUB_SHA} | |
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:latest | |
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:fall-2024 | |
- name: Push JH Image | |
run: | | |
docker push ${{ env.GAR_LOCATION }}:latest | |
docker push ${{ env.GAR_LOCATION }}:fall-2024 | |
docker push ${{ env.GAR_LOCATION }}:${GITHUB_REF##*/} | |
docker push ${{ env.GAR_LOCATION }}:${GITHUB_SHA} | |
- name: Upload Conda Env Files to Google Storage Bucket | |
run: | | |
gsutil cp -r requirements/out gs://jupyterhub-environment-files/fall-2024/mpa2065/past/${GITHUB_SHA}/conda | |
gsutil cp -r requirements/out gs://jupyterhub-environment-files/fall-2024/mpa2065/latest/conda |