Build-Push #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |