revert sr.ht builds to just+image rather than task+manifest
This commit is contained in:
parent
f28f3e7a68
commit
f42565d3e7
16
.build.yml
16
.build.yml
@ -1,24 +1,31 @@
|
||||
image: alpine/edge
|
||||
image: alpine/latest
|
||||
|
||||
secrets:
|
||||
- 0ee986ff-5686-43cd-ac3a-1fe5b2e5dd8f
|
||||
- f523ee29-5ef8-490f-8903-43ad7c49060b
|
||||
- 130adee5-3a8f-4035-8cad-e3d044be2961
|
||||
|
||||
sources:
|
||||
- https://git.sr.ht/~jswank/alpine-cli#3
|
||||
|
||||
packages:
|
||||
- podman
|
||||
- go-task
|
||||
- runit
|
||||
|
||||
tasks:
|
||||
# cgroups need to be running in order to run podman
|
||||
- prep: |
|
||||
sudo rc-service cgroups start
|
||||
sleep 1
|
||||
|
||||
# build the image using the just recipe
|
||||
# - sudo (-u root) is required to run podman without more setup
|
||||
- build: |
|
||||
cd alpine-cli
|
||||
sudo --preserve-env go-task build
|
||||
sudo --preserve-env just build
|
||||
# sudo --preserve-env go-task build
|
||||
|
||||
# publish the image using the just recipe
|
||||
# - set environment variables from the ~/.envdir directory. see
|
||||
# http://smarden.org/runit/chpst.8.html for details on chpst
|
||||
@ -26,6 +33,7 @@ tasks:
|
||||
# - sudo --preserve-env is required to pass environment variables
|
||||
- publish: |
|
||||
cd alpine-cli
|
||||
chpst -e ~/.envdir sudo --preserve-env go-task publish
|
||||
# chpst -e ~/.envdir sudo --preserve-env just registry=docker.io registry_pass_var=DH_PAT publish
|
||||
chpst -e ~/.envdir sudo --preserve-env just registry_pass_var=GH_PAT publish
|
||||
# chpst -e ~/.envdir sudo --preserve-env go-task publish
|
||||
# chpst -e ~/.envdir sudo --preserve-env just registry=docker.io registry_pass_var=DH_PAT publish
|
||||
# chpst -e ~/.envdir sudo --preserve-env just registry=quay.io registry_pass_var=QUAY_PAT publish
|
||||
|
||||
5
justfile
5
justfile
@ -11,12 +11,11 @@ registry_pass_var := "REGISTRY_PASSWORD"
|
||||
|
||||
# build a new image
|
||||
build flags="":
|
||||
podman manifest create {{image}}:{{tag}}
|
||||
podman build --platform linux/amd64,linux/arm64 --manifest {{image}}:{{tag}} {{flags}} -f Dockerfile ctx
|
||||
podman build -t {{image}}:{{tag}} {{flags}} -f Dockerfile ctx
|
||||
|
||||
# publish the image
|
||||
publish alt_tag=tag:
|
||||
@ podman tag {{image}}:{{tag}} {{registry}}/{{image}}:{{alt_tag}}
|
||||
@ echo "${{ registry_pass_var }}" | podman login {{registry}} -u {{registry_user}} --password-stdin
|
||||
@ podman manifest push {{registry}}/{{image}}:{{alt_tag}}
|
||||
@ podman push {{registry}}/{{image}}:{{alt_tag}}
|
||||
@ podman logout {{registry}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user