You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.2 KiB

---
kind: pipeline
type: docker
name: build
steps:
- name: prep
image: alpine
commands:
- apk add jq curl
# Create tags for Akaunting release versions
# e.g. images that include 2.0.26 will be tagged with 2, 2.0, and 2.0.26
- >
curl -s https://api.github.com/repos/akaunting/akaunting/releases/latest
| jq -r .tag_name | sed 's/\(\(\([0-9]\+\)\.[0-9]\+\)\.[0-9]\+\)/\1,\2,\3/'
> .tags
# For all non-main pushes, append tags with "-dev", add "dev" tag
# For main branch, add "latest" tag
- >
[ "${DRONE_COMMIT_BRANCH}" == "main" -a -z "${DRONE_PULL_REQUEST}" ]
&& sed -i 's/$/,latest/' .tags
|| sed -i -e 's/\([0-9]\+\)\([^0-9.]\)/\1-dev\2/g' -e 's/$/-dev,dev/' .tags
# Helpful debug output
- cat .tags
- name: docker
image: plugins/kaniko
settings:
username:
from_secret: HARBOR_USER
password:
from_secret: HARBOR_PASSWORD
repo: harbor.jharmison.com/akaunting/akaunting
registry: harbor.jharmison.com
build_args:
- GIT_BRANCH=${DRONE_COMMIT_BRANCH}
- GIT_COMMIT=${DRONE_COMMIT}
- SUPPORTED_LOCALES="en_US.UTF-8"
---
kind: signature
hmac: 70ff18e9556ef62d69a2f4cefc650f08bc40a5c6a48b551d5fdc0b61469d1aba
...