28 lines
695 B
YAML
28 lines
695 B
YAML
name: build-local-image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: nix-host
|
|
steps:
|
|
- name: Fetch repository archive
|
|
run: |
|
|
set -euo pipefail
|
|
curl -fsSL "https://git.centraworks.net/api/v1/repos/centra/lightscale-admin/archive/${GITHUB_SHA}.tar.gz?rev=${GITHUB_SHA}" \
|
|
| tar -xz --strip-components=1
|
|
|
|
- name: Validate workspace
|
|
run: |
|
|
set -euo pipefail
|
|
test -f Dockerfile
|
|
|
|
- name: Build local image on runner host
|
|
run: docker build --pull -t lightscale-admin:local .
|
|
|
|
- name: Show built image
|
|
run: docker image ls lightscale-admin:local
|