-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.57 KB
/
apma0350S02.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: build-image-apma0350S02
on:
push:
paths:
- 'requirements/classes/apma0350S02/**'
- 'Dockerfile'
- 'docker-compose.yml'
- 'scripts/**'
- '.github/workflows/apma0350S02.yml'
workflow_dispatch:
env:
CLASS: apma0350S02
TARGET: base
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/apma0350S02
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: Configure Docker
run: gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Build JH Image
run: |
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up jh_image
- name: Tag JH Image
run: |
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:${GITHUB_REF##*/}
docker tag ${{ env.CLASS }}:latest ${{ env.GAR_LOCATION }}:latest
- name: Push JH Image
run: |
docker push ${{ env.GAR_LOCATION }}:latest
docker push ${{ env.GAR_LOCATION }}:${GITHUB_REF##*/}