-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.32 KB
/
pipeline.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
name: 'Pipeline'
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
checks:
name: 'checks'
#if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "100"
- name: 'checks'
uses: ./.github/workflows/templates/checks
build:
name: 'build'
#if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py310
named-caches-hash: ${{ hashFiles('python-default.lock') }}
cache-lmdb-store: 'true'
- name: 'docker login'
run: docker login -u _json_key -p "$ARTIFACT_SA" europe-west4-docker.pkg.dev
env:
ARTIFACT_SA: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: 'publish to gcr'
run: VERSION=$(git rev-parse --short HEAD) pants --filter-target-type=docker_image publish dags/luchtmeetnet_ingestion:img