This commit is contained in:
Jason Swank
2026-01-10 01:48:07 +00:00
parent 7111fd4d2a
commit 66763da932
2 changed files with 8 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ packages:
- podman - podman
- just - just
- runit - runit
- go-task
tasks: tasks:
# cgroups need to be running in order to run podman # cgroups need to be running in order to run podman
@@ -23,17 +24,17 @@ tasks:
# - sudo (-u root) is required to run podman without more setup # - sudo (-u root) is required to run podman without more setup
- build: | - build: |
cd alpine-cli cd alpine-cli
sudo --preserve-env just build # sudo --preserve-env just build
# sudo --preserve-env go-task build sudo --preserve-env go-task build
# publish the image using the just recipe # publish the image using the just recipe
# - set environment variables from the ~/.envdir directory. see # - set environment variables from the ~/.envdir directory. see
# http://smarden.org/runit/chpst.8.html for details on chpst # http://smarden.org/runit/chpst.8.html for details on chpst
# - sudo (-u root) is required to run podman without more setup # - sudo (-u root) is required to run podman without more setup
# - sudo --preserve-env is required to pass environment variables # - sudo --preserve-env is required to pass environment variables
- publish: | # - publish: |
cd alpine-cli # cd alpine-cli
chpst -e ~/.envdir sudo --preserve-env just registry_pass_var=GH_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 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=docker.io registry_pass_var=DH_PAT publish
# chpst -e ~/.envdir sudo --preserve-env just registry=quay.io registry_pass_var=QUAY_PAT publish # chpst -e ~/.envdir sudo --preserve-env just registry=quay.io registry_pass_var=QUAY_PAT publish

View File

@@ -34,13 +34,12 @@ tasks:
desc: publish the image desc: publish the image
internal: true internal: true
cmds: cmds:
- podman tag {{.IMAGE}}:{{.TAG}} {{.REGISTRY}}/{{.IMAGE}}:{{.ALT_TAG}} - podman tag {{.IMAGE}}:{{.TAG}} {{.REGISTRY}}/{{.IMAGE}}:{{default .TAG .ALT_TAG}}
- echo "${{.REGISTRY_PASS_VAR}}" | podman login {{.REGISTRY}} -u {{.REGISTRY_USER}} --password-stdin - echo "${{.REGISTRY_PASS_VAR}}" | podman login {{.REGISTRY}} -u {{.REGISTRY_USER}} --password-stdin
- podman manifest push {{.REGISTRY}}/{{.IMAGE}}:{{.ALT_TAG}} - podman manifest push {{.REGISTRY}}/{{.IMAGE}}:{{default .TAG .ALT_TAG}}
- podman logout {{.REGISTRY}} - podman logout {{.REGISTRY}}
vars: vars:
REGISTRY_PASS_VAR: GH_PAT REGISTRY_PASS_VAR: GH_PAT
REGISTRY: ghcr.io REGISTRY: ghcr.io
REGISTRY_USER: jswank REGISTRY_USER: jswank
ALT_TAG: '{{.TAG}}'