forked from opentargets/gentropy
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (71 loc) · 2.51 KB
/
artifact.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build and Push to Artifact Registry
"on":
push:
branches: ["*"]
tags: ["*"]
env:
PROJECT_ID: open-targets-genetics-dev
REGION: europe-west1
GAR_LOCATION: europe-west1-docker.pkg.dev/open-targets-genetics-dev
REPOSITORY: gentropy-app
PYTHON_VERSION_DEFAULT: "3.10.8"
jobs:
build-push-artifact:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.SERVICE_ACCOUNT_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: "Docker auth"
run: |-
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Quick Docker build (gentropy only, AMD64 only, with layer cache)
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/gentropy:${{ github.ref_name }}"
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push gentropy image
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/gentropy:${{ github.ref_name }}"
context: .
- name: Build and push VEP image
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/custom_ensembl_vep:${{ github.ref_name }}"
context: .
file: "src/vep/Dockerfile"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Build and push spark cluster dependencies
run: |
make build