-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.19 KB
/
build.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
# Only build (optionally push) the project image when a release is made, which
# is represented by a push-tag event or a workflow_dispatch from another workflow.
---
name: Build-Push
env:
# Current supported Python version. For applications, there is generally no
# reason to support multiple Python versions, so all actions are run with
# this version. Quote the version to avoid interpretation as a floating
# point number.
PYTHON_VERSION: "3.12"
UV_PYTHON_PREFERENCE: "system"
BUILDKIT_PROGRESS: "plain"
"on":
push:
tags:
- "*"
workflow_dispatch:
jobs:
ci:
uses:
./.github/workflows/ci.yaml
build:
runs-on: ubuntu-latest
needs: [ci]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: evaluate expression
run: |
echo "Should push: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && startsWith(github.ref_name, 'tickets/DM-') }}"
- uses: lsst-sqre/build-and-push-to-ghcr@v1
id: build
with:
image: ${{ github.repository }}
target: runtime-image
github_token: ${{ secrets.GITHUB_TOKEN }}
push: false