Add CI-Pipeline for docker #1

Merged
Nikurasu merged 14 commits from add-ci into main 2023-04-05 20:06:14 +01:00
Showing only changes of commit af35eb27d2 - Show all commits

View file

@ -1,12 +1,13 @@
pipeline: pipeline:
build: build:
secrets: [user, pass] secrets: [user, pass, HOMETOWN_VERSION]
image: docker.io/docker:23-cli image: docker.io/docker:23-cli
commands: commands:
- apk add curl git - apk add curl git
- docker login -u $USER -p $PASS dev.cat-enby.club - docker login -u $USER -p $PASS dev.cat-enby.club
- HOMETOWN_VERSION=$(curl -sX GET "https://api.github.com/repos/hometown-fork/hometown/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') && docker buildx build --build-arg HOMETOWN_VERSION=$HOMETOWN_VERSION -t dev.cat.enby.club/nikurasu/hometown:latest -t dev.cat-enby.club/nikurasu/hometown:$${HOMETOWN_VERSION//+} -f ./Dockerfile . - HOMETOWN_VERSION=$(curl -sX GET "https://api.github.com/repos/hometown-fork/hometown/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') # && docker buildx build --build-arg HOMETOWN_VERSION=$HOMETOWN_VERSION -t dev.cat.enby.club/nikurasu/hometown:latest -t dev.cat-enby.club/nikurasu/hometown:$${HOMETOWN_VERSION//+} -f ./Dockerfile .
- docker push dev.cat-enby.club/nikurasu/hometown:$HOMETOWN_VERSION - echo $${HOMETOWN_VERSION//+}
# - docker push dev.cat-enby.club/nikurasu/hometown:$HOMETOWN_VERSION
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
# - docker push dev.cat-enby.club/nikurasu/hometown:latest # - docker push dev.cat-enby.club/nikurasu/hometown:latest