Add container publish logic
This commit is contained in:
parent
c1408d1777
commit
9b86268f35
@ -2,16 +2,22 @@ image: alpine/edge
|
||||
|
||||
secrets:
|
||||
- 0f9c437f-5dfc-49f1-abfb-0030f265c018
|
||||
- 4a3f4fc4-428c-4e38-acce-c93a986777b6
|
||||
|
||||
packages:
|
||||
- docker
|
||||
- perl
|
||||
- just
|
||||
|
||||
tasks:
|
||||
- prep: |
|
||||
sudo addgroup build docker
|
||||
sudo rc-service docker start
|
||||
sleep 4
|
||||
- build: |
|
||||
cd alpine-cli
|
||||
perl -nE '$ARGV =~ s/.*\.(.+)/uc($1)/e; chomp; printf qq/%s="%s"\n/,$ARGV, $_;' ~/.env.* > .env
|
||||
just build
|
||||
|
||||
- publish: |
|
||||
cd alpine-cli
|
||||
just publish
|
||||
|
||||
7
justfile
7
justfile
@ -1,3 +1,5 @@
|
||||
set dotenv-load
|
||||
|
||||
image := "ghcr.io/jswank/alpine-cli:latest"
|
||||
|
||||
# get a bash shell on a temporary container using {{image}}
|
||||
@ -10,3 +12,8 @@ run:
|
||||
# build a new image
|
||||
build:
|
||||
docker build -t {{image}} -f Dockerfile ./ctx
|
||||
|
||||
publish:
|
||||
echo $GH_PAT | docker login ghcr.io -u jswank --password-stdin
|
||||
docker push {{image}}
|
||||
docker logout ghcr.io
|
||||
|
||||
Loading…
Reference in New Issue
Block a user