-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.82 KB
/
jupyter.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Jupyter
on:
push:
branches:
- main
paths:
- .github/workflows/jupyter.yaml
- jupyter/Dockerfile
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
env:
IMAGE: jupyter
permissions:
contents: read
id-token: write
packages: write
jobs:
build:
name: Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Check if we can build Dockerfile
uses: docker/build-push-action@v5
with:
file: jupyter/Dockerfile
load: true
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: projects/193123067890/locations/global/workloadIdentityPools/ci-knada-images/providers/ci-knada-images
service_account: [email protected]
- uses: docker/login-action@v3
name: Login to Google Artifact Registry
with:
registry: europe-north1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- uses: docker/login-action@v3
name: Login to GitHub Container Registry
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: echo "TAG=$(git log -1 --pretty=%ad --date=format:%Y-%m-%d)-$(git log --pretty=format:'%h' -n 1)" >> $GITHUB_ENV
- uses: docker/build-push-action@v5
with:
file: jupyter/Dockerfile
push: true
tags: |
europe-north1-docker.pkg.dev/knada-gcp/knada-north/${{ env.IMAGE }}:${{ env.TAG }}-3.11
ghcr.io/${{ github.repository }}/${{ env.IMAGE }}:${{ env.TAG }}-3.11